#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
int n, m;
int flg[MAXN];
int d[MAXN];
vector<int> p[MAXN];
int main() {
  scanf(" %d %d", &n, &m);
  for (int i = 2; i <= n; i++) {
    if (!flg[i]) {
      for (int j = i; j <= n; j += i) {
        flg[j] = 1;
        p[j].push_back(i);
      }
    }
  }
  memset(flg, 0, sizeof(flg));
  while (m--) {
    char type;
    int k;
    scanf(" %c %d", &type, &k);
    if ('+' == type) {
      if (flg[k])
        puts("Already on");
      else {
        int tag = 0;
        for (int i = 0; i < p[k].size(); i++)
          if (d[p[k][i]]) {
            tag = d[p[k][i]];
            break;
          }
        if (tag)
          printf("Conflict with %d\n", tag);
        else {
          flg[k] = 1;
          for (int i = 0; i < p[k].size(); i++) d[p[k][i]] = k;
          puts("Success");
        }
      }
    } else {
      if (flg[k] == 0)
        puts("Already off");
      else {
        flg[k] = 0;
        for (int i = 0; i < p[k].size(); i++) d[p[k][i]] = 0;
        puts("Success");
      }
    }
  }
  return 0;
}
