#include <bits/stdc++.h>
using namespace std;
bool inque[100005];
int pos[100005];
int main() {
  int n, m;
  vector<int> data;
  cin >> n >> m;
  string str;
  char op;
  int index;
  cin.get();
  for (int i = 0; i < m; i++) {
    getline(cin, str);
    stringstream sin(str);
    sin >> op >> index;
    if (op == '+') {
      if (inque[index])
        cout << "Already on" << endl;
      else {
        bool flag = true;
        int j;
        for (j = 2; j * j <= index; j++) {
          if (index % j == 0) {
            if (pos[j] != 0 || pos[index / j] != 0) {
              flag = false;
              break;
            }
          }
        }
        if (flag && pos[index]) {
          flag = false;
          j = index;
        }
        if (!flag)
          cout << "Conflict with " << (pos[j] ? pos[j] : pos[index / j])
               << endl;
        else {
          for (j = 2; j * j <= index; j++) {
            if (index % j == 0) {
              pos[j] = pos[index / j] = index;
            }
          }
          pos[index] = index;
          cout << "Success" << endl;
          inque[index] = 1;
        }
      }
    } else if (op == '-') {
      if (!inque[index])
        cout << "Already off" << endl;
      else {
        inque[index] = 0;
        for (int j = 2; j * j <= index; j++) {
          if (index % j == 0) {
            pos[j] = pos[index / j] = 0;
          }
        }
        pos[index] = 0;
        cout << "Success" << endl;
      }
    }
  }
  return 0;
}
