#include <bits/stdc++.h>
using namespace std;
int n, m, a;
bool yes[10004][2], ans;
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    memset(yes, 0, sizeof yes);
    int k;
    cin >> k;
    ans = false;
    while (k--) {
      cin >> a;
      if (yes[abs(a)][1 - a > 0]) ans = true;
      yes[abs(a)][a > 0] = true;
    }
    if (!ans) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
