#include <bits/stdc++.h>
using namespace std;
const int N = 100005, M = 505;
int ff[N];
int getf(int v) { return ff[v] == v ? v : ff[v] = getf(ff[v]); }
int n, fl, ans, v[N], w[N], q[N], f[M][N];
void update(int l, int r, int vv) {
  if (l > r) return;
  int p = r;
  fl = 1;
  while (p >= l) {
    if (!q[p]) q[p] = vv;
    p = getf(p);
    if (p > l)
      ff[getf(p)] = getf(p - 1), p = getf(p - 1);
    else
      break;
  }
}
int getpos(int vv) {
  int l = 1, r = n, ret = 0;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (v[mid] > vv)
      ret = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  return ret;
}
int solve() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i], w[i] = n, f[1][i] = 1;
  if (n == 1) return 1;
  for (int x = 1; x <= 455; x++) {
    for (int i = 1; i <= n; i++) ff[i] = i, q[i] = 0;
    fl = 0;
    if (x == 1) update(1, n - 1, n);
    for (int i = n; i > 0; --i) {
      if (!q[i])
        w[i] = i - 1;
      else
        w[i] = min(w[i], q[i]);
      if (w[i] < i) {
        update(f[x][i], i, i);
        f[x + 1][i] = i + 1;
        continue;
      }
      f[x + 1][i] = getpos(v[i] * 2 - v[w[i]]);
      update(f[x][i], f[x + 1][i] - 1, i);
    }
    if (!fl) return x - 1;
  }
  throw;
}
int main() {
  ios::sync_with_stdio(false);
  int T, ans = 0;
  cin >> T;
  while (T--) ans ^= solve();
  cout << (ans ? "YES" : "NO") << endl;
  return 0;
}
