#include <iostream>
using namespace std;
int arr[101];
int main() {
long long x, c;
cin >> x;
int n, i = 0;
cin >> n;
while (cin >> c) {
if (c == x) {
arr[i % n]++;
}
i++;
}
for (int i = 0; i < n; i++) {
if (arr[i] > 0) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOyAKCmludCBhcnJbMTAxXTsKaW50IG1haW4oKSB7Cglsb25nIGxvbmcgeCwgYzsKCWNpbiA+PiB4OwoJaW50IG4sIGkgPSAwOwoJY2luID4+IG47Cgl3aGlsZSAoY2luID4+IGMpIHsKCQlpZiAoYyA9PSB4KSB7CgkJCWFycltpICUgbl0rKzsKCQl9CgkJaSsrOwoJfQoJZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspIHsKCQlpZiAoYXJyW2ldID4gMCkgewoJCQljb3V0IDw8ICJZRVMiIDw8IGVuZGw7CgkJfQoJCWVsc2UgewoJCQljb3V0IDw8ICJOTyIgPDwgZW5kbDsKCQl9Cgl9CglyZXR1cm4gMDsKfQ==