#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  int seivearr[n + 1];
  for (int i = 0; i < n + 1; i++) {
    seivearr[i] = i;
  }
  for (int i = 2; i * i < n + 1; i++) {
    if (seivearr[i] == i) {
      for (int j = i; i * j < n + 1; j++) {
        if (seivearr[i * j] == i * j) {
          seivearr[i * j] = i;
        }
      }
    }
  }
  unordered_set<int> uset;
  bool flag = true;
  unordered_map<int, unordered_set<int>> umap;
  while (m--) {
    char ch;
    int k;
    cin >> ch >> k;
    if (ch == '-') {
      int z = k;
      if (uset.find(k) == uset.end()) {
        cout << "Already off\n";
      } else {
        cout << "Success\n";
        uset.erase(k);
        while (k != 1) {
          umap[seivearr[k]].erase(z);
          k = k / seivearr[k];
        }
      }
    } else {
      if (flag) {
        cout << "Success\n";
        flag = false;
        uset.insert(k);
        int z = k;
        while (k != 1) {
          umap[seivearr[k]].insert(z);
          k = k / seivearr[k];
        }
        continue;
      }
      if (uset.find(k) == uset.end()) {
        int z = k;
        vector<int> intr;
        bool insrflag = true;
        while (z != 1) {
          if (umap.find(seivearr[z]) != umap.end()) {
            if (!umap[seivearr[z]].empty()) {
              cout << "Conflict with " << *umap[seivearr[z]].begin() << "\n";
              insrflag = false;
              break;
            }
          }
          intr.push_back(seivearr[z]);
          z = z / seivearr[z];
        }
        if (insrflag) {
          for (auto it = intr.begin(); it != intr.end(); it++) {
            umap[*it].insert(k);
          }
          uset.insert(k);
          cout << "Success\n";
        }
      } else {
        cout << "Already on\n";
      }
    }
  }
  return 0;
}
