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