#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
const int inf = (int)1e9 + 1;
const long long big = (long long)1e18 + 1;
const int P = 239;
const int MOD = (int)1e9 + 7;
const int MOD1 = (int)1e9 + 9;
const double eps = 1e-9;
const double pi = atan2(0, -1);
const int ABC = 26;
vector<int> pr[N + 1];
set<int> act[N + 1];
bool work[N + 1];
void init() {
  for (int i = 2; i <= N; i++) {
    int x = i;
    for (int j = 2; j * j <= x; j++)
      if (x % j == 0) {
        pr[i].push_back(j);
        while (x % j == 0) x /= j;
      }
    if (x > 1) pr[i].push_back(x);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(20);
  init();
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    char type;
    int v;
    cin >> type >> v;
    if (type == '+') {
      if (work[v]) {
        cout << "Already on\n";
      } else {
        int ok = -1;
        for (int p : pr[v])
          if ((int)act[p].size() > 0) {
            ok = *act[p].begin();
            break;
          }
        if (ok == -1) {
          cout << "Success\n";
          for (int p : pr[v]) act[p].insert(v);
          work[v] = true;
        } else {
          cout << "Conflict with " << ok << "\n";
        }
      }
    } else {
      if (work[v]) {
        cout << "Success\n";
        for (int p : pr[v]) act[p].erase(v);
        work[v] = false;
      } else {
        cout << "Already off\n";
      }
    }
  }
  return 0;
}
