#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int inf = 1e8 + 7;
const int N = 1e5 + 1;
int main() {
  bool ok = false;
  int n, m;
  cin >> n >> m;
  while (m--) {
    int k;
    scanf("%d", &k);
    set<int> s1, s2;
    bool kk = true;
    if (k == 1) ok = true;
    while (k--) {
      int a;
      scanf("%d", &a);
      if (a > 0) {
        if (s2.find(a) != s2.end()) {
          kk = false;
        }
        s1.insert(a);
      } else {
        a = -a;
        if (s1.find(a) != s1.end()) {
          kk = false;
        }
        s2.insert(a);
      }
    }
    if (kk == true) ok = true;
  }
  if (ok)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
