#include <bits/stdc++.h>
using namespace std;
const int R = 350;
const int maxN = 101000;
vector<int> sieve(R + 1);
vector<int> primes;
set<int> T[maxN + 1];
vector<int> S(maxN + 1, 0);
void eratostenes() {
  for (int i = 2; i <= R; i++) {
    sieve[i] = 1;
  }
  for (int i = 2; i <= R; i++) {
    if (sieve[i] == 1) {
      primes.push_back(i);
      for (int j = 2 * i; j <= R; j += i) {
        sieve[j] = 0;
      }
    }
  }
}
vector<int> hallarFactores(int x) {
  vector<int> factores;
  for (int i = 0; i < primes.size(); i++) {
    if (x % primes[i] == 0) {
      factores.push_back(primes[i]);
      while (x % primes[i] == 0) {
        x /= primes[i];
      }
    }
  }
  if (x > 1) factores.push_back(x);
  return factores;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  eratostenes();
  int n, m, x, i;
  string op;
  cin >> n >> m;
  while (m--) {
    cin >> op >> x;
    if (op == "+") {
      if (S[x] == 1)
        cout << "Already on" << '\n';
      else {
        vector<int> divisores = hallarFactores(x);
        for (i = 0; i < divisores.size(); i++) {
          if (T[divisores[i]].size() > 0) break;
        }
        if (i == divisores.size()) {
          for (i = 0; i < divisores.size(); i++) {
            T[divisores[i]].insert(x);
          }
          S[x] = 1;
          cout << "Success" << '\n';
        } else
          cout << "Conflict with " << *(T[divisores[i]].begin()) << '\n';
      }
    } else {
      if (S[x] == 0)
        cout << "Already off" << '\n';
      else {
        S[x] = 0;
        vector<int> divisores = hallarFactores(x);
        for (i = 0; i < divisores.size(); i++) {
          set<int>::iterator it = T[divisores[i]].find(x);
          T[divisores[i]].erase(it);
        }
        cout << "Success" << '\n';
      }
    }
  }
}
