#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
vector<int> pr, lp(N);
int n, m, p[100001], pp[100001], x, v;
bool fl[100001], fll[100001];
set<int> a;
string f;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (int i = 2; i <= N; i++) {
    if (lp[i] == 0) {
      lp[i] = i;
      pr.push_back(i);
    }
    for (int j = 0; j < pr.size() && pr[j] <= lp[i] && i * pr[j] <= N; j++)
      lp[i * pr[j]] = pr[j];
  }
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> f >> x;
    set<int> s;
    int xx = x;
    while (xx > 1) {
      s.insert(lp[xx]);
      xx /= lp[xx];
    }
    if (f == "+") {
      if (fll[x])
        cout << "Already on" << endl;
      else {
        bool ff = true;
        for (auto &j : s)
          if (fl[j] == true) {
            ff = false;
            v = p[j];
          }
        if (ff) {
          cout << "Success" << endl;
          fll[x] = 1;
          for (auto &j : s) {
            fl[j] = true;
            p[j] = x;
          }
          a.insert(x);
        } else
          cout << "Conflict with " << v << endl;
      }
    } else {
      if (!fll[x])
        cout << "Already off" << endl;
      else {
        cout << "Success" << endl;
        a.erase(x);
        fll[x] = false;
        for (auto &j : s) fl[j] = false;
      }
    }
  }
  return 0;
}
