#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1E-9;
const int INF = (int)1E9;
const long long INF64 = (long long)1E18;
int main() {
  int n, m;
  scanf("%d", &n);
  ;
  scanf("%d", &m);
  ;
  bool ans = 0;
  for (int i = 0; i < (int)(m); i++) {
    int k;
    cin >> k;
    map<int, int> m;
    bool f = 0;
    for (int j = 0; j < (int)(k); j++) {
      int t;
      cin >> t;
      if (m[-t]) {
        f = 1;
      }
      m[t]++;
    }
    if (f == 0) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
}
