#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int visit[N], re[N], ans[N];
int check(int x) {
  int k = 0;
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      if (re[i] == -1 || re[i] != -1 && visit[re[i]] == 0) {
        ans[k++] = i;
      } else
        return re[i];
      if (re[x / i] == -1 || re[x / i] != -1 && visit[re[x / i]] == 0) {
        ans[k++] = x / i;
      } else
        return re[x / i];
    }
  }
  if (re[x] != -1 && visit[re[x]] == 1) return re[x];
  for (int i = 0; i < k; i++) {
    re[ans[i]] = x;
  }
  re[x] = x;
  visit[x] = 1;
  return -1;
}
int main() {
  int n, m;
  char c;
  int num;
  scanf("%d%d", &n, &m);
  memset(re, -1, sizeof(re));
  memset(visit, 0, sizeof(visit));
  for (int i = 0; i < m; i++) {
    getchar();
    scanf("%c %d", &c, &num);
    if (c == '+') {
      if (visit[num])
        puts("Already on");
      else {
        int p = check(num);
        if (p == -1)
          puts("Success");
        else
          printf("Conflict with %d\n", p);
      }
    } else {
      if (visit[num]) {
        visit[num] = 0;
        puts("Success");
      } else
        puts("Already off");
    }
  }
  return 0;
}
