#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int ar[maxn];
int br[maxn];
int cr[maxn][50];
int dr[maxn];
int fls, n, m, k;
int te = (int)sqrt(maxn);
void init() {
  memset(br, 0, sizeof br);
  memset(dr, 0, sizeof dr);
  br[0] = br[1] = 1;
  fls = 0;
  for (int i = 2; i <= 1e5; i++)
    if (br[i] == 0) {
      for (long long int j = i; j <= 1e5; j += i) {
        br[j] = 1;
        cr[j][dr[j]++] = i;
      }
    }
}
int main() {
  init();
  char x[3];
  while (~scanf("%d%d", &n, &m)) {
    memset(ar, 0, sizeof ar);
    memset(br, 0, sizeof br);
    for (int i = 0; i < m; i++) {
      scanf("%s", x);
      scanf("%d", &k);
      if (x[0] == '+') {
        if (br[k]) {
          printf("Already on\n");
        } else {
          int flag = -1;
          for (int j = 0; j < dr[k]; j++)
            if (ar[cr[k][j]]) {
              flag = ar[cr[k][j]];
              break;
            }
          if (flag != -1) {
            printf("Conflict with %d\n", flag);
          } else {
            br[k] = 1;
            for (int j = 0; j < dr[k]; j++) ar[cr[k][j]] = k;
            printf("Success\n");
          }
        }
      } else if (x[0] == '-') {
        if (br[k]) {
          br[k] = 0;
          for (int j = 0; j < dr[k]; j++) ar[cr[k][j]] = 0;
          printf("Success\n");
        } else {
          printf("Already off\n");
        }
      }
    }
  }
}
