#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  scanf("%lld", &n);
  scanf("%lld", &m);
  set<long long> s;
  bool cancel = false;
  while (m--) {
    long long i, a;
    scanf("%lld", &i);
    s.clear();
    bool tmp = true;
    while (i--) {
      scanf("%lld", &a);
      if (s.find(0 - a) != s.end()) tmp = false;
      s.insert(a);
    }
    cancel = cancel | tmp;
  }
  if (cancel)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
