#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int MAXN = 1e5;
int d[N], p[N], a[N], id[N];
bool vis[N];
void pre() {
  memset(d, -1, sizeof(d));
  for (int i = 2; i <= MAXN; i++)
    if (d[i] == -1)
      for (int j = 2 * i; j <= MAXN; j += i) d[j] = i;
  for (int i = 1; i <= MAXN; i++) {
    if (d[i] == -1)
      p[i] = i, a[i] = 1;
    else {
      p[i] = d[i];
      int x = i;
      while (x % p[i] == 0) x /= p[i];
      a[i] = x;
    }
  }
}
int solve(int x) {
  int tmp = x;
  while (tmp > 1) {
    if (id[p[tmp]]) return id[p[tmp]];
    tmp = a[tmp];
  }
  tmp = x;
  while (tmp > 1) {
    id[p[tmp]] = x;
    tmp = a[tmp];
  }
  return 0;
}
void re(int x) {
  while (x > 1) {
    id[p[x]] = 0;
    x = a[x];
  }
}
int main() {
  pre();
  int n, m;
  while (~scanf("%d%d", &n, &m)) {
    for (int i = 0; i <= n; i++) vis[i] = 0, id[i] = 0;
    for (int i = 0; i < m; i++) {
      char op[2];
      int x;
      scanf("%s%d", op, &x);
      if (op[0] == '+') {
        if (vis[x])
          puts("Already on");
        else {
          int ans = solve(x);
          if (ans)
            printf("Conflict with %d\n", ans);
          else {
            puts("Success");
            vis[x] = 1;
          }
        }
      } else {
        if (!vis[x])
          puts("Already off");
        else {
          puts("Success");
          vis[x] = 0;
          re(x);
        }
      }
    }
  }
  return 0;
}
