#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const double PI = 3.141592653589793238463;
const int INF = 0x3f3f3f3f;
const int INFS = 1000000000;
const long long LLINF = 9223372036854775807;
const int M = 1000000007;
const double EPS = 1e-9;
set<int> get(int n) {
  set<int> ans = {};
  for (int i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      ans.insert(i);
      while (n % i == 0) n /= i;
    }
  }
  if (n != 1) ans.insert(n);
  return ans;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  cin >> n >> m;
  vector<set<int> > a(n + 1);
  for (int i = 1; i < n + 1; i++) a[i] = get(i);
  map<int, int> curr;
  vector<bool> on(n + 1, false);
  char t;
  int i;
  while (m--) {
    cin >> t >> i;
    if (t == '+') {
      if (on[i])
        cout << "Already on" << endl;
      else {
        bool ok = true;
        int j;
        for (auto x : a[i]) {
          if (curr[x] != 0) {
            ok = false;
            j = curr[x];
            break;
          }
        }
        if (ok) {
          cout << "Success" << endl;
          for (auto x : a[i]) curr[x] = i;
          on[i] = true;
        } else {
          cout << "Conflict with " << j << endl;
        }
      }
    } else {
      if (!on[i])
        cout << "Already off" << endl;
      else {
        cout << "Success" << endl;
        for (auto x : a[i]) curr[x] = 0;
        on[i] = false;
      }
    }
  }
  return 0;
}
