#include <bits/stdc++.h>
using namespace std;
vector<int> prime[100005];
int judge[100005], a[100005], d[100005], m, n;
void init() {
  int i, j;
  for (i = 2; i <= 100000; i++) {
    if (!a[i]) {
      prime[i].push_back(i);
      for (j = 2 * i; j <= 100000; j += i) {
        a[j] = 1;
        prime[j].push_back(i);
      }
    }
  }
}
int check(int x) {
  int i, l, flag = -1;
  l = prime[x].size();
  for (i = 0; i < l; i++) {
    if (judge[prime[x][i]]) {
      flag = judge[prime[x][i]];
      break;
    }
  }
  if (flag < 0)
    for (i = 0; i < l; i++) judge[prime[x][i]] = x;
  return flag;
}
void del(int x) {
  int i, l;
  l = prime[x].size();
  for (i = 0; i < l; i++) judge[prime[x][i]] = 0;
}
int main() {
  int c, e;
  char b;
  init();
  scanf("%d%d ", &n, &m);
  while (m--) {
    scanf("%c %d", &b, &c);
    getchar();
    if (b == '+') {
      if (d[c])
        puts("Already on");
      else {
        e = check(c);
        if (e > 0)
          printf("Conflict with %d\n", e);
        else {
          puts("Success");
          d[c] = 1;
        }
      }
    } else {
      if (!d[c])
        puts("Already off");
      else {
        puts("Success");
        del(c);
        d[c] = 0;
      }
    }
  }
  return 0;
}
