#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> isprime(110000, 1);
  isprime[0] = isprime[1] = 0;
  for (int i = 2; i * i <= 110000; i++) {
    if (isprime[i]) {
      for (int j = i * i; j < 110000; j += i) isprime[j] = 0;
    }
  }
  vector<int> primes;
  for (int i = 0; i < isprime.size(); i++) {
    if (isprime[i]) primes.push_back(i);
  }
  int n, m;
  cin >> n >> m;
  vector<int> colliders(n + 1, 0);
  vector<set<int> > cp(n + 1);
  for (int i = 0; i < m; i++) {
    string tmp;
    cin >> tmp;
    int num;
    cin >> num;
    vector<int> ps;
    int tnum = num;
    for (int j = 0; j < primes.size(); j++) {
      if (tnum % primes[j] == 0) {
        ps.push_back(primes[j]);
        while (tnum % primes[j] == 0) {
          tnum /= primes[j];
        }
      }
      if (tnum == 1) break;
      if (isprime[tnum]) {
        ps.push_back(tnum);
        break;
      }
    }
    if (tmp == "+") {
      if (colliders[num] == 1) {
        cout << "Already on" << endl;
      } else {
        int flg = -1;
        for (int j = 0; j < ps.size(); j++) {
          if (cp[ps[j]].size() != 0) {
            flg = j;
            break;
          }
        }
        if (flg == -1) {
          colliders[num] = 1;
          cout << "Success" << endl;
          for (int j = 0; j < ps.size(); j++) {
            cp[ps[j]].insert(num);
          }
        } else {
          int cnum = *cp[ps[flg]].begin();
          cout << "Conflict with " << cnum << endl;
        }
      }
    } else {
      if (colliders[num] == 0) {
        cout << "Already off" << endl;
      } else {
        cout << "Success" << endl;
        colliders[num] = 0;
        for (int j = 0; j < ps.size(); j++) {
          if (cp[ps[j]].find(num) != cp[ps[j]].end()) {
            cp[ps[j]].erase(cp[ps[j]].find(num));
          }
        }
      }
    }
  }
  return 0;
}
