#include <bits/stdc++.h>
using namespace std;
const int maxn = 20000 + 5;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    bool isBad = true;
    int k;
    scanf("%d", &k);
    set<int> a;
    vector<int> nums;
    for (int j = 0; j < k; j++) {
      int val;
      scanf("%d", &val);
      nums.push_back(val);
      a.insert(val);
    }
    for (int j = 0; j < (int)nums.size(); j++) {
      if (a.count(-nums[j]) != 0) {
        isBad = false;
      }
    }
    if (isBad == true) {
      printf("YES");
      return 0;
    }
  }
  printf("NO");
}
