#include <bits/stdc++.h>
using namespace std;
map<long long, bool> maap;
int main() {
  long long n, m;
  cin >> n >> m;
  bool v = 0, vv = 0;
  for (int i = 0; i < m; i++) {
    long long k, a;
    cin >> k;
    for (int j = 0; j < k; j++) {
      cin >> a;
      maap[a] = 1;
      if (maap[-a] == 1) {
        v = 1;
      }
    }
    if (v == 0) {
      vv = 1;
    }
    maap.clear();
    v = 0;
  }
  if (vv == 1) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
