#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  map<int, int> temp;
  set<int> temp2;
  while (m--) {
    int k;
    cin >> k;
    int b;
    for (int i = 0; i < k; i++) {
      cin >> b;
      temp[b]++;
    }
    for (auto it = temp.begin(); it != temp.end(); it++) {
      temp2.insert(abs(it->first));
    }
    if (temp2.size() == temp.size()) {
      cout << "YES\n";
      return 0;
    }
    temp2.clear();
    temp.clear();
  }
  cout << "NO\n";
}
