#include <bits/stdc++.h>
using namespace std;
vector<int> factorize(int n) {
  vector<int> factors;
  for (int i = 2; i * i <= n; ++i)
    if (n % i == 0) {
      int cnt = 0;
      while (n % i == 0) ++cnt, n /= i;
      factors.push_back(i);
    }
  if (n != 1) factors.push_back(n);
  return factors;
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<bool> state(n + 1);
  map<int, multiset<int> > primePowers;
  for (int i = (0); i < ((m)); ++i) {
    string oper;
    int n;
    cin >> oper >> n;
    if (oper == "+") {
      if (state[n] == 1)
        cout << "Already on\n";
      else {
        vector<int> const& factors = factorize(n);
        int conflictWith = -1;
        for (int j = (0); j < (((int)factors.size())); ++j) {
          if (!primePowers[factors[j]].empty()) {
            conflictWith = *primePowers[factors[j]].begin();
            break;
          }
        }
        if (conflictWith != -1) {
          cout << "Conflict with " << conflictWith << endl;
        } else {
          for (int j = (0); j < (((int)factors.size())); ++j) {
            primePowers[factors[j]].insert(n);
          }
          cout << "Success\n";
          state[n] = 1;
        }
      }
    } else {
      if (state[n] == 0)
        cout << "Already off\n";
      else {
        vector<int> const& factors = factorize(n);
        for (int j = (0); j < (((int)factors.size())); ++j) {
          primePowers[factors[j]].erase(primePowers[factors[j]].find(n));
        }
        state[n] = 0;
        cout << "Success\n";
      }
    }
  }
  return 0;
}
