#include "testlib.h"
#include <bits/stdc++.h>
//#define int long long
using namespace std;
const int A=1'000'000'000;
const int N=200'000;
int main(int argc, char *argv[]) {
    registerValidation(argc, argv);
    int n=inf.readInt(1,N,"n");
    inf.readSpace();
    int q=inf.readInt(1,N,"m");
    inf.readEoln();
    vector<int>a=inf.readInts(n,1,A,"a");
    inf.readEoln();
    for(int i=0;i<q;i++){
        int x=inf.readInt(1,A,"x");
        inf.readEoln();
    }
    inf.readEof();
    int group = atoi(validator.group().c_str());
    set<int> s;
    for (int aa : a) {
        s.insert(aa);
    }
    if (group == 1) {
        ensure((int) s.size() == 1);
    }
    if (group == 2) {
        ensure(n <= 1000);
        ensure(q <= 1000);
    }
    if (group == 3) {
        ensure((int) s.size() <= 100);
    }
}
