#include <bits/stdc++.h>
using namespace std;
int father[100001], push[100001];
int cn;
void add(int num) {
  cn = 0;
  int tmp = num;
  for (int i = 2; i <= sqrt(tmp); i++) {
    if (tmp % i == 0) {
      if (!father[i]) {
        push[cn++] = i;
      } else {
        printf("Conflict with %d\n", father[i]);
        return;
      }
    }
    while (tmp % i == 0) {
      tmp /= i;
    }
  }
  if (tmp > 1 && father[tmp]) {
    printf("Conflict with %d\n", father[tmp]);
    return;
  }
  for (int i = 0; i < cn; i++) {
    father[push[i]] = num;
  }
  if (tmp > 1) {
    father[tmp] = num;
  }
  father[num] = num;
  printf("Success\n");
}
void remove(int num) {
  father[num] = 0;
  for (int i = 2; i <= sqrt(num); i++) {
    if (num % i == 0) {
      father[i] = 0;
    }
    while (num % i == 0) {
      num /= i;
    }
  }
  if (num > 1) {
    father[num] = 0;
  }
}
int main(void) {
  int n, m;
  scanf("%d %d", &n, &m);
  char op;
  int num;
  for (int i = 0; i < m; i++) {
    scanf(" %c %d", &op, &num);
    if (op == '+') {
      if (!father[num]) {
        add(num);
      } else if (father[num] == num) {
        printf("Already on\n");
      } else {
        printf("Conflict with %d\n", father[num]);
      }
    } else if (op == '-') {
      if (father[num] != num) {
        printf("Already off\n");
      } else {
        remove(num);
        printf("Success\n");
      }
    }
  }
  return 0;
}
