#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int mark[maxn];
bool ma[maxn];
vector<int> pri[maxn];
void garb() {
  for (int i = 2; i < maxn; ++i)
    if (!(int)pri[i].size())
      for (int j = 1; j * i < maxn; ++j) pri[i * j].push_back(i);
}
int n, m;
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  garb();
  for (int i = 0; i < m; ++i) {
    int it;
    char ch;
    cin >> ch;
    cin >> it;
    if (ch == '-') {
      if (ma[it]) {
        cout << "Success" << endl;
        for (int i = 0; i < (int)pri[it].size(); ++i) mark[pri[it][i]] = false;
      } else
        cout << "Already off" << endl;
      ma[it] = 0;
    } else {
      if (!ma[it]) {
        bool bo = true;
        int con = -1;
        for (int i = 0; i < (int)pri[it].size(); ++i) {
          if (mark[pri[it][i]]) {
            bo = false;
            con = mark[pri[it][i]];
            break;
          }
        }
        if (bo) {
          for (int i = 0; i < (int)pri[it].size(); ++i) {
            mark[pri[it][i]] = it;
          }
          cout << "Success" << endl;
          ma[it] = 1;
        } else
          cout << "Conflict with " << con << endl;
      } else
        cout << "Already on" << endl;
    }
  }
  return 0;
}
