#include <bits/stdc++.h>
using namespace std;
int arr[15000][2];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  bool ans = true;
  for (int a = 0; a < m; a++) {
    bool err = false;
    int k;
    scanf("%d", &k);
    memset(arr, 0, sizeof(arr));
    for (int b = 0; b < k; b++) {
      int w;
      scanf("%d", &w);
      if (w < 0)
        arr[-w][0] = 1;
      else
        arr[w][1] = 1;
    }
    for (int b = 0; b <= n; b++)
      if ((arr[b][0] != 0) && arr[b][0] == arr[b][1]) err = true;
    if (err == false) ans = false;
  }
  printf("%s\n", (ans == false) ? "YES" : "NO");
}
