#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<int>> factors(n + 1, vector<int>());
  factors[1].push_back(1);
  for (int i = 2; (long long)i <= n; ++i) {
    if (factors[i].size() == 0) {
      for (int j = i; j <= n; j += i) {
        factors[j].push_back(i);
      }
    }
  }
  vector<int> conflicts(n + 1, 0);
  for (int i = 0; i != m; ++i) {
    char op;
    int collider;
    cin >> op >> collider;
    if (op == '+') {
      bool add = true;
      for (const auto &factor : factors[collider]) {
        if (conflicts[factor] != 0) {
          if (conflicts[factor] == collider)
            cout << "Already on\n";
          else
            cout << "Conflict with " << conflicts[factor] << '\n';
          add = false;
          break;
        }
      }
      if (add) {
        cout << "Success\n";
        for (const auto &factor : factors[collider])
          conflicts[factor] = collider;
      }
    } else if (op == '-') {
      if (conflicts[factors[collider].back()] != collider)
        cout << "Already off\n";
      else {
        cout << "Success\n";
        for (const auto &factor : factors[collider]) conflicts[factor] = 0;
      }
    }
  }
  return 0;
}
