#include <bits/stdc++.h>
using namespace std;
int a[10005][2];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  int k, t, t1;
  int flag = 0;
  while (m--) {
    scanf("%d", &k);
    memset(a, 0, sizeof(a));
    flag = 0;
    for (int i = 0; i < k; i++) {
      scanf("%d", &t);
      t1 = abs(t);
      if (a[t1][0] == 0) {
        a[t1][0] = 1;
        if (t > 0)
          a[t1][1] = 1;
        else
          a[t1][1] = 0;
      } else {
        if (t > 0 && a[t1][1] == 0)
          flag = 1;
        else if (t < 0 && a[t1][1] == 1)
          flag = 1;
      }
    }
    if (flag == 0) {
      printf("YES");
      return 0;
    }
  }
  printf("NO");
}
