#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, num;
  bool check;
  string s, str;
  char c;
  cin >> n >> m;
  int spf[n + 1], a[n + 1];
  for (int i = 0; i <= n; i++) {
    spf[i] = 0;
    a[i] = 0;
  }
  spf[1] = 1;
  for (int i = 2; i <= n; i++) {
    for (int j = i; j <= n; j = j + i) {
      if (!spf[j]) {
        spf[j] = i;
      }
    }
  }
  vector<set<int>> pfs(n + 1);
  vector<set<int>> pfo(n + 1);
  cin.ignore();
  for (int i = 1; i <= m; i++) {
    getline(cin, s);
    str = s.substr(2);
    num = stoi(str);
    c = s.at(0);
    int temp = num;
    if (c == '+') {
      if (a[num]) {
        cout << "Already on" << endl;
      } else {
        while (temp != 1) {
          pfs[num].insert(spf[temp]);
          temp = temp / spf[temp];
        }
        check = false;
        for (int x : pfs[num]) {
          if (pfo[x].empty()) {
            check = false;
          } else {
            cout << "Conflict with " << *(pfo[x].begin()) << endl;
            check = true;
            break;
          }
        }
        if (!check) {
          a[num] = 1;
          cout << "Success" << endl;
          for (int x : pfs[num]) {
            pfo[x].insert(num);
          }
        }
      }
    } else if (c == '-') {
      if (!a[num]) {
        cout << "Already off" << endl;
      } else {
        a[num] = 0;
        cout << "Success" << endl;
        for (int x : pfs[num]) {
          pfo[x].erase(num);
        }
      }
    }
  }
}
