#include <bits/stdc++.h>
using namespace std;
bool cmp(long long a, long long b) { return a > b; }
long long expo(long long a, long long b, long long m) {
  if (b == 0) return 1;
  if (b == 1) return a;
  long long val = (expo(a, b / 2, m) * expo(a, b / 2, m)) % m;
  if (b & 1)
    return (val * a) % m;
  else
    return val;
}
long long mmi(long long a, long long m) { return expo(a, m - 2, m); }
long long a[200001], b[200001];
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, q;
  cin >> n >> q;
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) a[i] = 0;
  while (q--) {
    char ch;
    long long i;
    cin >> ch >> i;
    if (ch == '+') {
      if (a[i]) {
        cout << "Already on\n";
        continue;
      }
      long long cond = -1;
      for (long long j = 1; j < (sqrt(i) + 1); j++) {
        if (i % j == 0) {
          if (j != 1 && m.find(j) != m.end()) {
            cond = m[j];
            break;
          }
          long long p = i / j;
          if (p != 1 && m.find(p) != m.end()) {
            cond = m[p];
            break;
          }
        }
      }
      if (cond == -1) {
        for (long long j = 2; j < sqrt(i) + 1; j++) {
          if (i % j == 0) {
            m[j] = i;
            long long p = i / j;
            m[p] = i;
          }
        }
        m[i] = i;
        a[i] = 1;
        cout << "Success\n";
      } else {
        cout << "Conflict with " << cond << "\n";
      }
    } else {
      if (a[i]) {
        for (long long j = 1; j < sqrt(i) + 1; j++) {
          if (i % j == 0) {
            m.erase(j);
            long long p = i / j;
            m.erase(p);
          }
        }
        cout << "Success\n";
        a[i] = 0;
      } else {
        cout << "Already off\n";
      }
    }
  }
  return 0;
}
