#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10, size = 1 << 20, mod = 998244353, inf = 2e9;
template <class o>
void qr(o& x) {
  char c = getchar();
  x = 0;
  int f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  x *= f;
}
void cmax(int& x, int y) { x = x - y >> 31 ? y : x; }
int n, a[N], R[N];
namespace zkw {
const int K = 1 << 17;
int val[K << 1];
vector<int> tmp;
void clear() {
  for (int i : tmp) val[i] = 0;
  tmp.clear();
}
void ins(int a, int b, int x) {
  for (a += K - 1, b += K; a < b; a /= 2, b /= 2) {
    if (a & 1) tmp.push_back(a), cmax(val[a++], x);
    if (b & 1) cmax(val[--b], x), tmp.push_back(b);
  }
}
int ask(int x) {
  int y = 0;
  for (x += K - 1; x; x /= 2) cmax(y, val[x]);
  return y;
}
}  // namespace zkw
int solve() {
  qr(n);
  for (int i = 1; i <= n; i++) qr(a[i]);
  int mx = a[n];
  a[0] = mx + 1;
  for (int i = 0; i <= n - 1; i++) R[i] = n;
  for (int d = 1;; d++) {
    zkw::clear();
    for (int i = n - 1; i >= 0; i--) {
      if (!R[i]) continue;
      int z = zkw::ask(a[i]);
      if (!i && !z) return d;
      int l = max(1, 2 * a[i] - a[R[i]] + 1);
      int r = min(mx + 1, 2 * a[i] - a[z]);
      if (!z) r = mx + 1;
      zkw::ins(l, r, i);
      R[i] = min(R[i], z);
    }
  }
}
int main() {
  int T = 1, ans = 0;
  qr(T);
  while (T--) ans ^= solve();
  puts(ans ? "YES" : "NO");
  return 0;
}
