#include <bits/stdc++.h>
using namespace std;
int mex(set<int> r) {
  int z = 0;
  while (r.count(z)) z++;
  return z;
}
const int M = 500;
struct UF {
  int n;
  vector<int> par;
  UF(int _n) : n(_n) {
    for (int i = 0; i < n; i++) par.push_back(i);
  }
  int find(int a) {
    if (a != par[a]) par[a] = find(par[a]);
    return par[a];
  }
  bool join(int a, int b) {
    a = find(a);
    b = find(b);
    par[a] = b;
    return (a != b);
  }
};
int solve(vector<int> a) {
  int n = (int)a.size();
  vector<int> old_where(n, 0);
  vector<int> curk(n, n - 1);
  set<int> st;
  int ndone = 0;
  for (int v = 0;; v++) {
    vector<int> first_occ(n, -1);
    UF uf(n + 1);
    for (int j = n - 1; j >= 0; j--) {
      curk[j] = min(curk[j], first_occ[j]);
      if (old_where[j] == j + 1) continue;
      int where;
      if (curk[j] == -1) {
        where = j + 1;
      } else {
        int look = 2 * a[j] - a[curk[j]];
        where = lower_bound(a.begin(), a.end(), look + 1) - a.begin();
      }
      while (true) {
        int r = uf.find(old_where[j]);
        if (r >= where) break;
        uf.join(r, r + 1);
        first_occ[r] = j;
      }
      if (where == j + 1) {
        ndone++;
        st.insert(v);
      }
      old_where[j] = where;
    }
    if (ndone == n) break;
    if ((int)st.size() == n) break;
  }
  return mex(st);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  int ans = 0;
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (int& x : a) cin >> x;
    int res = solve(a);
    ans ^= res;
  }
  cout << (ans == 0 ? "NO" : "YES") << '\n';
}
