#include <bits/stdc++.h>
using namespace std;
int vis[100000];
int main() {
  int n, m, tag = 0;
  scanf("%d %d", &n, &m);
  while (m--) {
    int num, flag = 0;
    memset(vis, 0, sizeof(vis));
    scanf("%d", &num);
    while (num--) {
      int x;
      scanf("%d", &x);
      if (vis[abs(x)] == -x)
        flag = 1;
      else
        vis[abs(x)] = x;
    }
    if (flag == 0) tag = 1;
  }
  if (tag == 0)
    printf("NO");
  else
    printf("YES");
  return 0;
}
