#include <bits/stdc++.h>
using namespace std;
void chkmx(int &a, int b) {
  if (a < b) a = b;
}
const int N = 1e5 + 50, M = 450;
int n, m, a[N];
namespace zkw {
const int K = 1 << 17;
int t[K << 1];
vector<int> clr;
void init() {
  for (int z : clr) t[z] = 0;
  clr.clear();
}
void ins(int l, int r, int v) {
  if (l > r) return;
  for (l += K - 1, r += K + 1; l ^ r ^ 1; l >>= 1, r >>= 1) {
    if (l & 1 ^ 1) chkmx(t[l ^ 1], v), clr.push_back(l ^ 1);
    if (r & 1) chkmx(t[r ^ 1], v), clr.push_back(r ^ 1);
  }
}
int qry(int x) {
  int ans = 0;
  for (x += K; x; x >>= 1) chkmx(ans, t[x]);
  return ans;
}
}  // namespace zkw
int work() {
  cin >> m;
  int mx = 0, lm = 0;
  for (int i = 1; i <= m; i++) scanf("%d", &a[i]), mx = max(mx, a[i]);
  lm = sqrt(2 * mx) + 2, lm = min(lm, m);
  static int rem[N];
  a[0] = mx + 1;
  for (int i = 0; i < m; i++) rem[i] = m;
  for (int d = 1; d <= lm; d++) {
    zkw ::init();
    for (int i = m - 1; ~i; i--) {
      if (!rem[i]) continue;
      int z = zkw ::qry(a[i]);
      if (!i && !z) return d;
      int l = max(1, 2 * a[i] - a[rem[i]] + 1);
      int r = min(mx + 1, 2 * a[i] - a[z]);
      if (!z) r = mx + 1;
      zkw ::ins(l, r, i);
      rem[i] = min(rem[i], z);
    }
  }
}
int main() {
  cin >> n;
  int SG = 0;
  while (n--) SG ^= work();
  if (SG)
    puts("YES");
  else
    puts("NO");
  return 0;
}
