#include <bits/stdc++.h>
using namespace std;
int N, active[(int)2e5 + 7], there[(int)2e5 + 7], idx[(int)2e5 + 7];
int q;
int main() {
  ios::sync_with_stdio(false);
  cin >> N >> q;
  for (int j = 1; j <= q; j++) {
    char t;
    cin >> t;
    if (t == '+') {
      int x;
      cin >> x;
      if (active[x]) {
        cout << "Already on";
      } else {
        bool ok = 1;
        int y;
        for (int i = 2; i * i <= x; i++) {
          if (x % i == 0 && (there[i] || there[x / i])) {
            ok = 0;
            if (there[i])
              y = there[i];
            else
              y = there[x / i];
            break;
          }
        }
        if (there[x]) ok = 0, y = there[x];
        if (ok) {
          cout << "Success";
          for (int i = 2; i * i <= x; i++) {
            if (x % i == 0) {
              there[i] = x;
              there[x / i] = x;
            }
          }
          there[x] = x;
          active[x] = 1;
        } else
          cout << "Conflict with " << y;
      }
    } else {
      int x;
      cin >> x;
      if (!active[x])
        cout << "Already off";
      else {
        for (int i = 2; i * i <= x; i++) {
          if (x % i == 0) there[i] = 0, there[x / i] = 0;
        }
        cout << "Success";
        there[x] = 0;
        active[x] = 0;
      }
    }
    cout << "\n";
  }
  return 0;
}
