#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6 + 10;
int spf[MAX];
bool prime[MAX];
void sieve() {
  for (int i = 2; i < MAX; i++) spf[i] = 2;
  for (int i = 3; i < MAX; i += 2) {
    if (!prime[i]) {
      spf[i] = i;
      for (int j = 2; i * j < MAX; j++) {
        if (!prime[i * j]) prime[i * j] = 1, spf[i * j] = i;
      }
    }
  }
}
set<int> ss[MAX];
int primeFactInsert(int n) {
  int nn = n;
  vector<int> v;
  while (n > 1) {
    if (ss[spf[n]].size()) return *ss[spf[n]].begin();
    v.push_back(spf[n]);
    n /= spf[n];
  }
  for (auto i : v) ss[i].insert(nn);
  return 0;
}
void primeFactDelete(int n) {
  int nn = n;
  while (n > 1) {
    if (ss[spf[n]].find(nn) != ss[spf[n]].end()) ss[spf[n]].erase(nn);
    n /= spf[n];
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  sieve();
  int n, m, x;
  char type;
  cin >> n >> m;
  map<int, int> mp;
  for (int i = 0; i < m; i++) {
    cin >> type >> x;
    if (type == '+') {
      if (mp[x])
        cout << "Already on\n";
      else {
        int tt = primeFactInsert(x);
        if (!tt)
          cout << "Success\n", mp[x] = 1;
        else
          cout << "Conflict with " << tt << endl;
      }
    } else {
      if (mp[x])
        mp[x] = 0, primeFactDelete(x), cout << "Success\n";
      else
        cout << "Already off\n";
    }
  }
}
