#include <bits/stdc++.h>
using namespace std;
int main() {
  set<int> st;
  int N, M, ans = 0;
  scanf("%d %d", &N, &M);
  for (int A = 0; A < M; A++) {
    st.clear();
    int Y, K = 0;
    scanf("%d", &Y);
    for (int B = 0; B < Y; B++) {
      int t;
      scanf("%d", &t);
      st.insert(t);
      if (st.count(-1 * t) == 0) K++;
      if (K == Y) ans = 1;
    }
  }
  if (ans == 1)
    printf("YES");
  else
    printf("NO");
}
