#include <bits/stdc++.h>
int ok[10005];
int main() {
  int N, M;
  scanf("%d%d", &N, &M);
  bool ans = 0;
  for (int i = 0; i < M; i++) {
    memset(ok, 0, sizeof(ok));
    int K;
    scanf("%d", &K);
    bool check = 1;
    while (K--) {
      int a;
      scanf("%d", &a);
      int op = 1;
      if (a < 0) {
        a = -a;
        op = 2;
      }
      if ((ok[a] == 2 && op == 1) || (ok[a] == 1 && op == 2)) check = 0;
      if (op == 1)
        ok[a] = 1;
      else
        ok[a] = 2;
    }
    ans |= check;
  }
  if (ans)
    printf("YES\n");
  else
    printf("NO\n");
}
