#include <bits/stdc++.h>
using namespace std;
bool f = 1;
int main() {
  int n, m, t, k;
  cin >> n >> m;
  set<int> s;
  for (int i = 1; i <= m; i++) {
    cin >> t;
    s.clear();
    for (int j = 1; j <= t; j++) {
      cin >> k;
      s.insert(k);
      if (s.find(-k) != s.end()) {
        f = 0;
      }
    }
    if (f) {
      cout << "YES";
      return 0;
    } else
      f = 1;
  }
  cout << "NO";
  return 0;
}
