#include <bits/stdc++.h>
using namespace std;
int n, m, k[10000], num, ans = 1;
set<long int> s1;
set<long int> s2;
set<long int> intersect;
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> k[i];
    for (int j = 0; j < k[i]; j++) {
      cin >> num;
      if (num > 0) {
        s1.insert(num);
      } else {
        s2.insert(-1 * num);
      }
    }
    set_intersection(s1.begin(), s1.end(), s2.begin(), s2.end(),
                     std::inserter(intersect, intersect.begin()));
    if (intersect.size() == 0) ans = 0;
    s1.clear();
    s2.clear();
    intersect.clear();
  }
  if (ans == 0)
    cout << "YES";
  else
    cout << "NO";
}
