#include <bits/stdc++.h>
using namespace std;
long long arr[1000009];
bool can(int m) {
  map<int, bool> visited;
  for (int i = 0; i < m; i++) {
    if (visited[-1 * arr[i]]) return 0;
    visited[arr[i]] = 1;
  }
  return 1;
}
int main() {
  ios::sync_with_stdio(false);
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  int n, m;
  cin >> n >> n;
  for (int i = 0; i < n; i++) {
    cin >> m;
    for (int j = 0; j < m; j++) cin >> arr[j];
    if (can(m)) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
