#include <bits/stdc++.h>
using namespace std;
const long long N = (int)1e6 + 7;
const int INF = (int)1e9 + 7;
const int mod = (int)1e9 + 7;
map<int, int> mp;
inline void solve() {
  int n, m;
  cin >> n >> m;
  bool ans = 0, p = 1, ans1 = 0;
  for (int i = 1; i <= m; i++) {
    int k;
    cin >> k;
    p = 1;
    for (int j = 1; j <= k; j++) {
      int a;
      cin >> a;
      if (mp[-a]) {
        p = 0;
      }
      mp[a] = 1;
    }
    if (p) {
      cout << "YES";
      return;
    }
    mp.clear();
  }
  cout << "NO";
}
int main() {
  int test = 1;
  while (test--) {
    solve();
  }
}
