#include <bits/stdc++.h>
using namespace std;
int yin[100001], n;
bool flag[100001];
void getprim() {
  int i;
  long long j;
  yin[1] = 1;
  for (i = 2; i < 100001; i++) {
    if (yin[i] == 0) {
      yin[i] = 1;
      for (j = i, j = i * j; j < 100001; j += i) {
        yin[j] = i;
      }
    }
  }
}
int PR[100001];
void test(int num) {
  int ynum = num;
  while (yin[num] != 1) {
    if (PR[yin[num]] != 0) {
      printf("Conflict with %d\n", PR[yin[num]]);
      return;
    }
    num /= yin[num];
  }
  if (PR[num] != 0) {
    printf("Conflict with %d\n", PR[num]);
    return;
  }
  flag[ynum] = 1;
  printf("Success\n");
  num = ynum;
  while (yin[num] != 1) {
    PR[yin[num]] = ynum;
    num /= yin[num];
  }
  PR[num] = ynum;
}
int main() {
  getprim();
  int m, i, num;
  char s[2];
  scanf("%d %d", &n, &m);
  for (i = 0; i < m; i++) {
    scanf("%s %d", &s, &num);
    if (s[0] == '+') {
      if (flag[num] == 1) {
        printf("Already on\n");
        continue;
      } else {
        test(num);
      }
    } else {
      if (flag[num] == 1) {
        flag[num] = 0;
        printf("Success\n");
        while (yin[num] != 1) {
          PR[yin[num]] = 0;
          num /= yin[num];
        }
        PR[num] = 0;
      } else
        printf("Already off\n");
    }
  }
  return 0;
}
