#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, gr, num, p;
  bool b = false;
  cin >> n >> gr;
  while (gr--) {
    cin >> num;
    vector<int> search(n, 0);
    for (int i = 0; i < num; i++) {
      cin >> p;
      if (!b) {
        if (search[abs(p) - 1] == 0) {
          search[abs(p) - 1] += p;
          continue;
        }
        if (p != search[abs(p) - 1]) b = true;
      }
    }
    if (!b) {
      cout << "YES";
      return 0;
    }
    b = false;
  }
  cout << "NO";
  return 0;
}
