#include <bits/stdc++.h>   using namespace std;   int DEBUG = 0;   bool isss(vector<int> s1, vector<int> s2) {     int si1, si2;     si1 = s1.size();     si2 = s2.size();     for (int i = 0; i < si1; i++) {       bool ttt = false;       for (int j = 0; j < si2; j++) {         if (s1[i] == s2[j]) {           ttt = true;         }       }       if (!ttt) return false;     }     return true;   }   int main(int argc, char **argv) {     DEBUG = (argc >= 2) ? atoi(argv[1]) : 0;     int n;     cin >> n;     int m[n];     vector<int> a[n];     for (int i = 0; i < n; i++) {       cin >> m[i];       for (int j = 0; j < m[i]; j++) {         int tmp;         cin >> tmp;         a[i].push_back(tmp);       }     }     bool isp[n];     for (int i = 0; i < n; i++) isp[i] = true;     for (int i = 0; i < n; i++) {       for (int j = 0; j < n; j++) {         if (i != j) {           if (isss(a[i], a[j])) {             isp[j] = false;           }         }       }     }     for (int i = 0; i < n; i++)       if (isp[i])         cout <<  YES  << endl;       else         cout <<  NO  << endl;     return 0;   }   