#include <bits/stdc++.h>
using namespace std;
const int MAX = 100000 + 5;
int n, m, tab[100000 + 5];
vector<int> prime;
void ready() {
  memset(tab, 0, sizeof(tab));
  for (int i = 2; i < MAX; i++) {
    if (!tab[i]) {
      for (int j = i + i; j < MAX; j += i) tab[j] = 1;
      prime.push_back(i);
    }
  }
}
set<int> fenjie(int x, map<int, int>& mm) {
  int back = x;
  set<int> res;
  {
    for (int i = 0; i < prime.size() && prime[i] * prime[i] <= x; i++) {
      if (x % prime[i] == 0) {
        res.insert(prime[i]);
        while (x % prime[i] == 0) x /= prime[i];
      }
    }
  }
  if (x != 1) res.insert(x);
  return res;
}
int main() {
  ready();
  cin >> n >> m;
  set<int> x, y;
  map<int, int> mm;
  for (int i = 0; i < m; i++) {
    string s;
    int t;
    cin >> s >> t;
    if (s[0] == '+') {
      if (x.find(t) == x.end()) {
        int flag = 0;
        set<int> tmp = fenjie(t, mm);
        for (set<int>::iterator it = tmp.begin(); it != tmp.end(); it++) {
          if (y.find(*it) != y.end()) {
            flag = *it;
            break;
          }
        }
        if (flag == 0) {
          cout << "Success" << endl;
          x.insert(t);
          for (set<int>::iterator it = tmp.begin(); it != tmp.end(); it++) {
            y.insert(*it);
            mm[*it] = t;
          }
        } else
          printf("Conflict with %d\n", mm[flag]);
      } else {
        cout << "Already on" << endl;
      }
    } else {
      if (x.find(t) != x.end()) {
        set<int> tmp = fenjie(t, mm);
        cout << "Success" << endl;
        x.erase(t);
        for (set<int>::iterator it = tmp.begin(); it != tmp.end(); it++) {
          y.erase(*it);
          mm[*it] = 0;
        }
      } else {
        cout << "Already off" << endl;
      }
    }
  }
}
