#include <bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 5;
vector<int> d[mx];
set<int> s[mx];
int mark[mx], p[mx];
void sieve() {
  for (int i = 2; i < mx; i++) {
    if (!mark[i]) {
      for (int j = 2 * i; j < mx; j += i) {
        mark[j] = 1;
        d[j].push_back(i);
      }
    }
  }
  for (int i = 1; i < mx; i++) {
    if (!mark[i]) d[i].push_back(i);
  }
}
void add(int n) {
  if (mark[n])
    cout << "Already on";
  else {
    int x = -1;
    for (auto it : d[n])
      if (p[it]) x = it;
    if (x > 0)
      cout << "Conflict with " << *s[x].begin();
    else {
      cout << "Success";
      mark[n] = 1;
      for (auto it : d[n]) {
        p[it]++;
        s[it].insert(n);
      }
    }
  }
}
void baad(int n) {
  if (!mark[n])
    cout << "Already off";
  else {
    cout << "Success";
    mark[n] = 0;
    for (auto it : d[n]) {
      p[it]--;
      s[it].erase(s[it].find(n));
    }
  }
}
void solve() {
  sieve();
  memset(mark, 0, sizeof mark);
  int n, m;
  cin >> n >> m;
  while (m--) {
    char a;
    int b;
    cin >> a >> b;
    if (a == '+')
      add(b);
    else
      baad(b);
    cout << "\n";
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  cerr << "\nTime elapsed: " << 1000.0 * clock() / CLOCKS_PER_SEC << " ms\n";
  return 0;
}
