#include <bits/stdc++.h>
using namespace std;
map<int, int> cnt;
int main() {
  int n, m;
  cin >> n >> m;
  bool ok, flag = false;
  for (int i = 0; i < m; i++) {
    int k;
    cin >> k;
    cnt.clear();
    ok = false;
    for (int j = 0; j < k; j++) {
      int v;
      cin >> v;
      cnt[v]++;
      if (cnt[v] > 0 && cnt[-v] > 0) ok = true;
    }
    if (!ok) flag = true;
  }
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
