#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, m, k = 0;
bool isPrime[N];
int numMax[N];
bool state[N];
int a[N];
int b[N];
void eratos() {
  for (int i = 1; i < N; ++i)
    if (i & 1)
      numMax[i] = i;
    else
      numMax[i] = 2;
  for (int i = 3; i * i < N; i += 2)
    if (numMax[i] == i) {
      for (int j = i * i; j < N; j += i) numMax[j] = i;
    }
}
void extract(int u, int cur) {
  if (u == 1) {
    if (cur > 1) b[k++] = cur;
    return;
  }
  int val = numMax[u];
  int cnt = 0;
  while (u % val == 0) u /= val, cnt++;
  int v = cur;
  for (int i = 0; i <= cnt; ++i) {
    extract(u, v);
    v *= val;
  }
}
int main() {
  eratos();
  scanf("%d %d\n", &n, &m);
  memset(state, false, sizeof state);
  memset(a, 0xff, sizeof a);
  while (m--) {
    char c;
    int u;
    scanf("%c %d\n", &c, &u);
    if (c == '+') {
      if (state[u])
        printf("Already on\n");
      else {
        k = 0;
        int exist = -1;
        extract(u, 1);
        for (int i = 0; i < k; ++i)
          if (a[b[i]] != -1) {
            exist = a[b[i]];
            break;
          }
        if (exist != -1)
          printf("Conflict with %d\n", exist);
        else {
          printf("Success\n");
          for (int i = 0; i < k; ++i) a[b[i]] = u;
          state[u] = true;
        }
      }
    } else {
      if (!state[u])
        printf("Already off\n");
      else {
        printf("Success\n");
        state[u] = false;
        k = 0;
        extract(u, 1);
        for (int i = 0; i < k; ++i) a[b[i]] = -1;
      }
    }
  }
  return 0;
}
