#include <bits/stdc++.h>
using namespace std;
int prime[100005];
bool is_prime[100005];
bool exist[100005];
int prime_num[100005];
int n, m, k;
vector<int> V;
void sieve() {
  for (int i = 2; i * i < 100005; i++) {
    if (!is_prime[i])
      for (int j = 2; i * j < 100005; j++) is_prime[i * j] = true;
  }
  for (int i = 2; i < 100005; i++) {
    if (!is_prime[i]) {
      prime[k++] = i;
    }
  }
}
void factors(int num) {
  int tmp = num;
  int i = 0;
  while (num) {
    bool first = true;
    while (num % prime[i] == 0) {
      num = num / prime[i];
      if (first) {
        V.push_back(prime[i]);
        first = false;
      }
    }
    i++;
    if (i >= k || prime[i] * prime[i] > num) break;
  }
  if (num != 1) V.push_back(num);
}
int main() {
  sieve();
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int num;
    char c;
    cin >> c >> num;
    if (c == '+') {
      if (exist[num]) {
        cout << "Already on\n";
        continue;
      }
      factors(num);
      int sz = V.size();
      int cnf = 0;
      for (int i = 0; i < sz; i++)
        if (prime_num[V[i]]) {
          cnf = 1;
          cout << "Conflict with " << prime_num[V[i]] << "\n";
          V.clear();
          break;
        }
      if (cnf) continue;
      for (int i = 0; i < sz; i++) prime_num[V[i]] = num;
      V.clear();
      exist[num] = true;
      cout << "Success\n";
    } else {
      if (!exist[num]) {
        cout << "Already off\n";
        continue;
      }
      factors(num);
      int sz = V.size();
      for (int i = 0; i < sz; i++) prime_num[V[i]] = 0;
      V.clear();
      cout << "Success\n";
      exist[num] = false;
    }
  }
  return 0;
}
