#include <bits/stdc++.h>
using namespace std;
const int N = 100009;
int p[N], nump;
bool vis[N], C[N];
int st[N];
set<int> pdv[N];
void shutdown(int x) {
  int i, n = x;
  C[x] = false;
  for (i = 0; i < nump && p[i] * p[i] <= x; i++) {
    if (x % p[i] == 0) {
      st[p[i]] = -1;
      while (x % p[i] == 0) x /= p[i];
    }
  }
  if (x > 1) st[x] = -1;
}
int check(int x) {
  if (C[x]) return -1;
  int i, n = x;
  for (i = 0; i < nump && p[i] * p[i] <= x; i++) {
    if (x % p[i] == 0) {
      if (st[p[i]] >= 0) return st[p[i]];
      while (x % p[i] == 0) x /= p[i];
    }
  }
  if (x > 1)
    if (st[x] >= 0) return st[x];
  return -2;
}
void open(int x) {
  int i, n = x;
  C[x] = true;
  for (i = 0; i < nump && p[i] * p[i] <= x; i++) {
    if (x % p[i] == 0) {
      st[p[i]] = n;
      while (x % p[i] == 0) x /= p[i];
    }
  }
  if (x > 1) st[x] = n;
}
int main() {
  int i, j;
  for (i = 2; i * i < N; i++)
    if (!vis[i])
      for (j = i + i; j < N; j += i) {
        pdv[j].insert(i);
        vis[j] = true;
      }
  for (i = 2, j = 0; i < N; i++)
    if (!vis[i]) {
      pdv[i].insert(i);
      p[j++] = i;
    }
  nump = j;
  int n, m;
  while (scanf("%d %d", &n, &m) != EOF) {
    memset(C, false, sizeof(C));
    memset(st, -1, sizeof(st));
    char c[10];
    int x;
    for (i = 0; i < m; i++) {
      scanf("%s %d", c, &x);
      if (c[0] == '+') {
        j = check(x);
        if (j == -1)
          puts("Already on");
        else if (j >= 0) {
          printf("Conflict with %d\n", j);
        } else {
          open(x);
          puts("Success");
        }
        continue;
      }
      if (!C[x])
        puts("Already off");
      else {
        shutdown(x);
        puts("Success");
      }
    }
  }
  return 0;
}
