#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long MOD = 1e9 + 7;
long double EPS = 1e-12;
const long long INF32 = 0x3F3F3F3F;
const long long INF = 0x3F3F3F3F3F3F3F3F;
const long long crng = rng();
vector<long long> pfac;
void primefac(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i != 0) continue;
    pfac.push_back(i);
    while (n % i == 0) n /= i;
  }
  if (n > 1) pfac.push_back(n);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ifstream fin("input.txt");
  ofstream fout("output.txt");
  {
    long long n, m;
    cin >> n >> m;
    bool state[n + 1];
    memset(state, false, sizeof(state));
    map<long long, set<long long>> pind;
    for (long long q = 1; q <= m; q++) {
      char op;
      long long wh;
      cin >> op >> wh;
      if (op == '+') {
        if (state[wh]) {
          cout << "Already on\n";
          continue;
        }
        bool success = true;
        primefac(wh);
        for (auto i : pfac) {
          if (pind.find(i) != pind.end()) {
            success = false;
            cout << "Conflict with " << (*pind[i].begin()) << '\n';
            break;
          }
        }
        if (success) {
          cout << "Success\n", state[wh] = true;
          for (auto i : pfac) pind[i].insert(wh);
        }
        pfac.clear();
      } else {
        if (!state[wh]) {
          cout << "Already off\n";
          continue;
        }
        primefac(wh);
        for (auto i : pfac) {
          pind[i].erase(wh);
          if (pind[i].empty()) pind.erase(i);
        }
        cout << "Success\n", state[wh] = false;
        pfac.clear();
      }
    }
  }
}
