#include <bits/stdc++.h>
using namespace std;
const int N = 100555;
bool on[N];
int vis[N];
int p[N];
void gao(int n) {
  if (on[n]) {
    puts("Already on");
    return;
  }
  int t;
  for (t = n; t > 1; t /= p[t]) {
    if (vis[p[t]]) {
      printf("Conflict with %d\n", vis[p[t]]);
      return;
    }
  }
  on[n] = 1;
  for (t = n; t > 1; t /= p[t]) {
    vis[p[t]] = n;
  }
  puts("Success");
}
void del(int n) {
  if (on[n] == 0) {
    puts("Already off");
    return;
  }
  on[n] = 0;
  for (int t = n; t > 1; t /= p[t]) vis[p[t]] = 0;
  puts("Success");
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 2; i <= n; i++) {
    if (p[i] == 0) {
      for (int j = i; j < N; j += i) p[j] = i;
    }
  }
  char op[4];
  int x;
  while (m--) {
    scanf("%s%d", op, &x);
    if (op[0] == '+') {
      gao(x);
    }
    if (op[0] == '-') {
      del(x);
    }
  }
}
