#include <bits/stdc++.h>
const int Maxn = 1e5;
using namespace std;
int n, m, k;
int flag[Maxn + 5];
int gcd[Maxn + 5], p[Maxn + 5];
char ch;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf(" %c %d", &ch, &k);
    if (ch == '+') {
      if (flag[k])
        printf("Already on\n");
      else {
        bool ok = 1;
        for (int j = 1; j <= sqrt(k); j++) {
          if (k % j == 0 && j != 1)
            if (gcd[j] == 1) {
              printf("Conflict with %d\n", p[j]);
              ok = 0;
              break;
            }
          if (k % (k / j) == 0)
            if (gcd[k / j] == 1) {
              printf("Conflict with %d\n", p[k / j]);
              ok = 0;
              break;
            }
        }
        if (ok) {
          for (int j = 1; j <= sqrt(k); j++) {
            if (k % j == 0 && j != 1) gcd[j] = 1, p[j] = k;
            if (k % (k / j) == 0) gcd[k / j] = 1, p[k / j] = k;
          }
          printf("Success\n");
          flag[k] = 1;
        }
      }
    }
    if (ch == '-') {
      if (!flag[k])
        printf("Already off\n");
      else {
        printf("Success\n");
        for (int j = 1; j <= sqrt(k); j++) {
          if (k % j == 0 && j != 1) gcd[j] = 0, p[j] = 0;
          if (k % (k / j) == 0) gcd[k / j] = 0, p[k / j] = 0;
        }
        flag[k] = 0;
      }
    }
  }
}
