#include <bits/stdc++.h>
using namespace std;
bool prime[100001];
vector<int> printDivisors(int n) {
  vector<int> v;
  for (int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        v.push_back(i);
      else {
        v.push_back(i);
        v.push_back(n / i);
      }
    }
  }
  return v;
}
int main() {
  int n, m;
  cin >> n >> m;
  int k;
  char c;
  map<int, int> mp;
  int div[n + 1];
  memset(div, 0, sizeof(div));
  for (int i = 1; i <= n; i++) {
    mp.insert({i, 0});
  }
  vector<int> v;
  while (m--) {
    cin >> c >> k;
    if (c == '+') {
      if (mp[k] == 1) {
        cout << "Already on" << endl;
      } else {
        int flag = 0;
        vector<int> v = printDivisors(k);
        for (int i = 0; i < v.size(); i++) {
          if (div[v[i]] != 0 && v[i] != 1) {
            flag = div[v[i]];
            break;
          }
        }
        if (flag == 0) {
          cout << "Success" << endl;
          mp[k] = 1;
          for (int i = 0; i < v.size(); i++) {
            div[v[i]] = k;
          }
        } else {
          cout << "Conflict with " << flag << endl;
        }
      }
    } else {
      if (mp[k] == 0) {
        cout << "Already off" << endl;
      } else {
        cout << "Success" << endl;
        mp[k] = 0;
        vector<int> vv = printDivisors(k);
        for (int i = 0; i < vv.size(); i++) {
          div[vv[i]] = 0;
        }
      }
    }
  }
}
