#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
int dblcmp(double d) {
  if (fabs(d) < eps) return 0;
  return (d > 0) ? 1 : -1;
}
const int N = 200000;
const int inf = 100000000;
int n, m, T;
const int PRIMERANGE = N;
int prime[PRIMERANGE + 1];
int getPrime() {
  memset(prime, 0, sizeof(int) * (PRIMERANGE + 1));
  for (int i = 2; i <= PRIMERANGE; i++) {
    if (!prime[i]) prime[++prime[0]] = i;
    for (int j = 1; j <= prime[0] && prime[j] <= PRIMERANGE / i; j++) {
      prime[prime[j] * i] = 1;
      if (i % prime[j] == 0) break;
    }
  }
  return prime[0];
}
int factor[N][3], facCnt;
int pnum[N];
int getFactors(int x) {
  facCnt = 0;
  int tmp = x;
  for (int i = 1; prime[i] <= tmp / prime[i]; i++) {
    factor[facCnt][1] = 1, factor[facCnt][2] = 0;
    if (tmp % prime[i] == 0) factor[facCnt][0] = i;
    while (tmp % prime[i] == 0)
      factor[facCnt][2]++, factor[facCnt][1] *= prime[i], tmp /= prime[i];
    if (factor[facCnt][1] > 1) facCnt++;
  }
  if (tmp != 1)
    factor[facCnt][0] = pnum[tmp], factor[facCnt][1] = tmp,
    factor[facCnt++][2] = 1;
  return facCnt;
}
bool on[N];
int pp[N];
char str[2];
void fuck(int x) {
  getFactors(x);
  for (int i = 0; i < facCnt; ++i)
    if (pp[factor[i][0]]) {
      printf("Conflict with %d\n", pp[factor[i][0]]);
      return;
    }
  for (int i = 0; i < facCnt; ++i) {
    pp[factor[i][0]] = x;
  }
  on[x] = true;
  printf("Success\n");
  return;
}
void shit(int x) {
  getFactors(x);
  for (int i = 0; i < facCnt; ++i) {
    pp[factor[i][0]] = 0;
  }
  on[x] = false;
  printf("Success\n");
}
int main() {
  getPrime();
  for (int i = 1; i <= prime[0]; ++i) pnum[prime[i]] = i;
  cin >> n >> m;
  memset(pp, 0, sizeof(pp));
  while (m--) {
    int x;
    cin >> str >> x;
    if (strcmp(str, "+") == 0) {
      if (on[x])
        printf("Already on\n");
      else
        fuck(x);
    } else {
      if (!on[x])
        printf("Already off\n");
      else
        shit(x);
    }
  }
  return 0;
}
