#include <bits/stdc++.h>
using namespace std;
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
int Set(int N, int pos) { return (N | (1 << pos)); }
int fx[] = {-1, 0, 1, 0};
int fy[] = {0, 1, 0, -1};
inline long long BigMod(long long B, long long P, long long M) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) {
      R = (R * B) % M;
    }
    P /= 2;
    B = (B * B) % M;
  }
  return R;
}
const int N = 100000;
bool stat[N + 5];
vector<int> fac[N + 5];
void siv() {
  int sq = sqrt(N);
  fac[2].push_back(2);
  for (int i = 4; i <= N; i += 2) {
    stat[i] = 1;
    fac[i].push_back(2);
  }
  for (int i = 3; i <= N; i += 2) {
    if (!stat[i]) {
      fac[i].push_back(i);
      for (int j = 2 * i; j <= N; j += i) {
        stat[j] = 1;
        fac[j].push_back(i);
      }
    }
  }
}
set<int> st[N + 5];
bool mark[N + 5];
void add(int x) {
  if (mark[x] == 1) {
    cout << "Already on\n";
    return;
  }
  for (int i = 0; i < fac[x].size(); i++) {
    int num = fac[x][i];
    if (not st[num].empty()) {
      cout << "Conflict with " << *st[num].begin() << "\n";
      return;
    }
  }
  mark[x] = 1;
  cout << "Success\n";
  for (int i = 0; i < fac[x].size(); i++) {
    int num = fac[x][i];
    st[num].insert(x);
  }
}
void del(int x) {
  if (mark[x] == 0) {
    cout << "Already off\n";
    return;
  }
  for (int i = 0; i < fac[x].size(); i++) {
    int num = fac[x][i];
    st[num].erase(x);
  }
  mark[x] = 0;
  cout << "Success\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  siv();
  int n, q;
  cin >> n >> q;
  while (q--) {
    int x;
    char ch;
    cin >> ch >> x;
    if (ch == '+')
      add(x);
    else
      del(x);
  }
}
