#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
set<int> s[N];
int pfactor[N];
vector<int> fact(int n) {
  vector<int> v;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      v.emplace_back(i);
      if (n / i != i) {
        v.emplace_back(n / i);
      }
    }
  }
  if (n != 1) v.emplace_back(n);
  return v;
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    char c;
    int v;
    cin >> c >> v;
    if (c == '+') {
      if (pfactor[v]) {
        cout << "Already on\n";
        continue;
      }
      vector<int> f = fact(v);
      bool fg = true;
      for (auto& i : f) {
        if (s[i].size() > 0) {
          cout << "Conflict with " << *s[i].begin() << "\n";
          fg = false;
          break;
        }
      }
      if (fg) {
        cout << "Success\n";
        for (auto& i : f) s[i].insert(v);
        pfactor[v] = 1;
      }
    } else {
      if (!pfactor[v]) {
        cout << "Already off\n";
        continue;
      }
      vector<int> f = fact(v);
      cout << "Success\n";
      for (auto& i : f) s[i].erase(v);
      pfactor[v] = 0;
    }
  }
  return 0;
}
