#include <bits/stdc++.h>
using namespace std;
const double EPS = (1e-10);
bool EQ(double a, double b) { return abs((a) - (b)) < EPS; }
void fast_stream() { std::ios_base::sync_with_stdio(0); }
bool isActive[100001];
int domes[100001];
bool curPrime[100001];
void solve() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    char ch;
    int num;
    cin >> ch >> num;
    int num2 = num;
    if (ch == '+') {
      if (isActive[num]) {
        cout << "Already on" << endl;
        continue;
      }
      set<int> s;
      for (int i = 2; i * i <= num; i++) {
        while (num % i == 0) {
          num /= i;
          s.insert(i);
        }
      }
      if (num != 1) s.insert(num);
      bool iscon = false;
      int opt = 0;
      for (set<int>::iterator it = s.begin(); it != s.end(); it++) {
        if (curPrime[*it]) {
          iscon = true;
          opt = *it;
          break;
        }
      }
      if (iscon) {
        cout << "Conflict with " << domes[opt] << endl;
      } else {
        cout << "Success" << endl;
        isActive[num2] = true;
        for (set<int>::iterator it = s.begin(); it != s.end(); it++) {
          domes[*it] = num2;
          curPrime[*it] = true;
        }
      }
    } else {
      if (!isActive[num]) {
        cout << "Already off" << endl;
      } else {
        cout << "Success" << endl;
        set<int> s;
        for (int i = 2; i * i <= num; i++) {
          while (num % i == 0) {
            num /= i;
            s.insert(i);
          }
        }
        if (num != 1) s.insert(num);
        num = num2;
        isActive[num] = false;
        for (set<int>::iterator it = s.begin(); it != s.end(); it++)
          curPrime[*it] = false;
      }
    }
  }
}
int main() {
  solve();
  return 0;
}
