#include <bits/stdc++.h>
using namespace std;
int main() {
  int long long x1, x3 = 0, x4, n, x, i, f = 0, t;
  cin >> n >> x;
  for (i = 0; i < x; i++) {
    map<int long long, int> we;
    map<int long long, int>::iterator it;
    cin >> x1;
    t = 0;
    for (int j = 0; j < x1; j++) {
      cin >> x4;
      we[x4] = 1;
      x4 = x4 - x4 - x4;
      it = we.find(x4);
      if (it != we.end()) t = 1;
    }
    if (t == 0) f = 1;
  }
  if (f == 1)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
