#include <bits/stdc++.h>
using namespace std;
const int maxRange = 100000;
int n, m;
int np = 0;
int nf;
int factor[100001];
int l[100001];
int on[100001];
bool seive[maxRange + 1];
int prime[100001];
void createSieve();
void analize(int);
int main() {
  list<int>::iterator it;
  createSieve();
  for (int i = 2; i <= 100000; i++)
    if (seive[i]) prime[++np] = i;
  scanf("%d %d%*c", &n, &m);
  for (int q = 1; q <= m; q++) {
    int k;
    char op;
    scanf("%c%*c%d%*c", &op, &k);
    if (k == 1) {
      if (op == '+') {
        if (on[k] == 1)
          cout << "Already on" << endl;
        else {
          cout << "Success" << endl;
          on[k] = 1;
        }
      } else {
        if (on[k] == 0)
          cout << "Already off" << endl;
        else {
          cout << "Success" << endl;
          on[k] = 0;
        }
      }
      continue;
    }
    analize(k);
    if (op == '+') {
      if (on[k] == 1)
        printf("%s\n", "Already on");
      else {
        bool ok = true;
        for (int i = 1; i <= nf; i++)
          if (l[factor[i]] > 0) {
            ok = false;
            printf("%s %d\n", "Conflict with", l[factor[i]]);
            break;
          }
        if (ok) {
          for (int i = 1; i <= nf; i++) l[factor[i]] = k;
          on[k] = 1;
          cout << "Success" << endl;
        }
      }
    } else {
      if (on[k] == 0)
        printf("%s\n", "Already off");
      else {
        on[k] = 0;
        printf("%s\n", "Success");
        for (int i = 1; i <= nf; i++) l[factor[i]] = 0;
      }
    }
  }
  return 0;
}
void createSieve() {
  for (int i = 1; i <= maxRange; i++) seive[i] = true;
  seive[1] = false;
  for (int i = 2; i <= floor(sqrt(maxRange)) + 1; i++)
    if (seive[i]) {
      int k = i;
      seive[i] = true;
      while (i * k <= maxRange) {
        seive[i * k] = false;
        k++;
      }
    }
}
void analize(int k) {
  if (seive[k]) {
    nf = 1;
    factor[1] = k;
    return;
  }
  nf = 0;
  for (int i = 1; i <= np; i++)
    if (k % prime[i] == 0) {
      nf++;
      factor[nf] = prime[i];
      while (k % prime[i] == 0) k = k / prime[i];
      if (seive[k]) {
        nf++;
        factor[nf] = k;
        return;
      }
      if (k == 1) break;
    }
}
