#include <bits/stdc++.h>
using namespace std;
const int maxb = 800;
const int maxn = 2e5 + 10;
int a[maxn];
int maxv[maxn];
int dp[2][maxn];
int fa[maxn], pre[maxn], v[maxn];
int n;
int Find(int *p, int x) { return p[x] == x ? x : p[x] = Find(p, p[x]); }
int query(int x) { return v[Find(fa, x)]; }
void update(int l, int r, int x) {
  r = Find(pre, r);
  if (v[r]) r--;
  if (l > r) return;
  int nxt;
  while (r >= l) {
    nxt = Find(pre, r - 1);
    if (v[nxt]) --nxt;
    if (nxt < l) {
      v[r] = x;
      return;
    }
    fa[r] = nxt;
    r = nxt;
  }
}
void merge(int l, int r) {
  if (r < n && pre[r + 1] == r + 1 && v[r + 1]) pre[r + 1] = r;
  r = Find(pre, r);
  while (r > l) {
    pre[r] = r - 1;
    r = Find(pre, r - 1);
  }
  if ((l == r) && l > 1 && v[Find(pre, l - 1)]) pre[r] = r - 1;
}
int main() {
  int T;
  scanf("%d", &T);
  int ans = 0;
  while (T--) {
    scanf("%d", &n);
    for (int i = 1; i <= n; ++i) {
      scanf("%d", &a[i]);
    }
    for (int i = 0; i < n; ++i) {
      for (int j = a[i]; j < a[i + 1]; ++j) {
        maxv[j] = i + 1;
      }
    }
    int now = 0, last = 1;
    for (int i = 1; i <= n; ++i) dp[last][i] = 0, dp[now][i] = 1;
    for (int c = 1;; ++c) {
      for (int i = 1; i <= n; ++i) {
        fa[i] = pre[i] = i;
        v[i] = 0;
      }
      int flag = 0;
      swap(now, last);
      for (int i = n; i >= 1; --i) {
        int k = query(i);
        if (!k || 2 * a[i] - a[k] >= a[n])
          dp[now][i] = n + 1;
        else
          dp[now][i] = maxv[max(0, 2 * a[i] - a[k])];
        if (dp[last][i] >= dp[now][i])
          dp[now][i] = dp[last][i];
        else {
          update(dp[last][i], dp[now][i] - 1, i);
          merge(dp[last][i], dp[now][i] - 1);
        }
        if (dp[now][i] <= n) flag = 1;
      }
      if (!flag) {
        ans ^= c;
        break;
      }
    }
  }
  printf("%s\n", ans ? "YES" : "NO");
  return 0;
}
