#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int q;
    cin >> q;
    set<int> temp;
    bool no = 0;
    for (int j = 0; j < q; ++j) {
      int o;
      cin >> o;
      if (temp.find(-o) != temp.end()) no = 1;
      temp.insert(o);
    }
    if (!no) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
