#include <bits/stdc++.h>
int read() {
  static int c, x;
  while ((c = getchar()) < 48) {
  }
  x = c & 15;
  while ((c = getchar()) >= 48) x = x * 10 + (c & 15);
  return x;
}
int a[100010], fa[100010], lf[100010], ps[100010], df[100010];
bool vis[100010];
int findf(const int &x) { return fa[x] ? (fa[x] = findf(fa[x])) : x; }
int main() {
  int ans = 0;
  for (int T = read(); T--;) {
    const int n = read();
    for (int i = 1; i <= n; ++i) {
      a[i] = read();
    }
    int c = n - 1;
    for (int i = 1, j = 1; i <= n; ++i) {
      vis[i] = false;
      while (j != i && a[n] + a[j] <= (a[i] << 1)) ++j;
      ps[i] = j;
    }
    for (int i = 1;; ++i) {
      if (!c) {
        ans ^= i;
        break;
      }
      for (int j = 1; j <= n; ++j) {
        lf[j] = ps[j];
        ps[j] = j;
        df[j] = 0;
        fa[j] = 0;
      }
      for (int j = n; j; --j) {
        for (int k = findf(lf[j]); k < ps[j]; k = findf(k)) {
          ps[k] = std::max(
              lf[k],
              int(std::upper_bound(a + 1, a + n + 1, (a[k] << 1) - a[j]) - a));
          fa[k] = k + 1;
        }
        ++df[lf[j]];
        --df[ps[j]];
      }
      for (int j = 1; j != n; ++j) {
        df[j] += df[j - 1];
        if (!df[j] && !vis[j]) {
          vis[j] = true;
          --c;
        }
      }
    }
  }
  puts(ans ? "YES" : "NO");
  return 0;
}
