#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  bool ans = false;
  for (int i = 0; i != m; ++i) {
    int k, temp;
    cin >> k;
    map<int, int> x;
    set<int> y;
    bool check = true;
    for (int j = 0; j != k; ++j) {
      cin >> temp;
      if (y.find(temp) == y.end()) {
        y.insert(temp);
        if (temp < 0) temp = -temp;
        ++x[temp];
      }
    }
    for (auto i : x) {
      if (i.second > 1) {
        check = false;
        break;
      }
    }
    if (check) {
      ans = true;
      break;
    }
  }
  cout << (ans ? "YES" : "NO") << endl;
}
