#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, x;
  while (scanf("%d", &n) == 1) {
    vector<long long> a, b;
    for (int i = 0; i < n; ++i) {
      scanf("%d", &m);
      long long mask1 = 0, mask2 = 0;
      for (int j = 0; j < m; ++j) {
        scanf("%d", &x);
        x--;
        if (x < 64)
          mask1 ^= (1LL << x);
        else
          mask2 ^= (1LL << (x - 64));
      }
      a.push_back(mask1), b.push_back(mask2);
    }
    for (int i = 0; i < n; ++i) {
      bool possible = 1;
      for (int j = 0; j < n; ++j)
        if (j != i) {
          if ((a[i] & a[j]) == a[j] && (b[i] & b[j]) == b[j]) {
            possible = 0;
            break;
          }
        }
      puts(possible ? "YES" : "NO");
    }
  }
}
