#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200000;
vector<int> getDiv(int n) {
  vector<int> out;
  for (int i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      out.push_back(i);
      if (n / i != i) out.push_back(n / i);
    }
  }
  out.push_back(n);
  return out;
}
int main() {
  int n, m;
  cin >> n >> m;
  map<int, int> on;
  while (m--) {
    char ch;
    cin >> ch;
    if (ch == '-') {
      int x;
      cin >> x;
      if (on[x] == 0 || on[x] != x) {
        cout << "Already off\n";
      } else {
        vector<int> div = getDiv(x);
        on[x] = 0;
        for (int i = 0; i < div.size(); ++i) {
          on[div[i]] = 0;
        }
        cout << "Success\n";
      }
    } else if (ch == '+') {
      int x;
      cin >> x;
      if (on[x] == x) {
        cout << "Already on\n";
        continue;
      }
      vector<int> div = getDiv(x);
      bool f = false;
      for (int i = 0; i < div.size(); ++i) {
        if (on[div[i]] != 0) {
          cout << "Conflict with " << on[div[i]] << '\n';
          f = 1;
          break;
        }
      }
      if (f) {
        continue;
      }
      on[x] = x;
      for (int i = 0; i < div.size(); ++i) {
        on[div[i]] = x;
      }
      cout << "Success\n";
    }
  }
  return 0;
}
