#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4 + 10;
int n, m;
map<int, int> mp;
int a[maxn];
int main() {
  scanf("%d%d", &n, &m);
  int ans = false;
  while (m--) {
    int cnt;
    scanf("%d", &cnt);
    mp.clear();
    int temp = false;
    for (int i = 1; i <= cnt; i++) {
      scanf("%d", &a[i]);
      mp[a[i]]++;
    }
    for (int i = 1; i <= cnt; i++) {
      if (mp[-a[i]]) {
        temp = true;
        break;
      }
    }
    if (temp == 0) ans = true;
  }
  if (ans)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
