#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(0);
  cout.sync_with_stdio(0);
  long long int n, m, a, b, c, x, y, mn, mx, x1, y1, x2, y2, d, k, p;
  map<long long int, long long int> mp;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> k;
    if (k == 1) {
      cout << "YES";
      return 0;
    }
    for (int j = 0; j < k; j++) {
      cin >> x;
      if (mp[-x] != 0) {
        p = 1;
      }
      mp[x]++;
    }
    if (p == 0) {
      cout << "YES";
      return 0;
    }
    mp.clear();
    p = 0;
  }
  cout << "NO" << endl;
  return 0;
}
