#include <bits/stdc++.h>
int main() {
  int ans = 1, m, n;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int a[10005][2] = {0}, k, mid, j;
    scanf("%d", &k);
    for (j = 0; j < k; j++) {
      scanf("%d", &mid);
      if (mid > 0)
        a[mid][0] = 1;
      else {
        mid = -mid;
        a[mid][1] = 1;
      }
      if (a[mid][0] + a[mid][1] == 2) break;
    }
    if (j == k) {
      ans = 0;
      break;
    } else
      while (++j < k) scanf("%*d");
  }
  printf("%s\n", ans ? "NO" : "YES");
  return 0;
}
