#include <bits/stdc++.h>
using namespace std;
long long c, a, b, d, i, n, m, x, k, j, p;
map<long long, long long> mp;
int main() {
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    cin >> k;
    if (k == 1) {
      cout << "YES";
      return 0;
    }
    for (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";
}
