#include <bits/stdc++.h>
struct info {
  int num[20], size;
} zs[120000];
char c;
bool pd[120000];
int n, m, i, j, g, len, max, sum[120000], id[120000];
int main() {
  scanf("%d%d\n", &n, &m);
  for (i = 2; i <= n; ++i) {
    g = i;
    len = std::sqrt(g) + 1;
    for (j = 2; j <= len; ++j) {
      if (g % j == 0) zs[i].num[++zs[i].size] = j;
      while (g % j == 0) g /= j;
    }
    if (g > 1) zs[i].num[++zs[i].size] = g;
  }
  for (i = 1; i <= m; ++i) {
    scanf("%c%d\n", &c, &g);
    if (c == '-') {
      if (pd[g]) {
        pd[g] = false;
        for (j = 1; j <= zs[g].size; ++j) --sum[zs[g].num[j]];
        printf("Success\n");
      } else
        printf("Already off\n");
    }
    if (c == '+') {
      if (!pd[g]) {
        bool kt = true;
        for (j = 1; j <= zs[g].size; ++j)
          if (sum[zs[g].num[j]] > 0) {
            printf("Conflict with %d\n", id[zs[g].num[j]]);
            kt = false;
            break;
          }
        if (kt) {
          for (j = 1; j <= zs[g].size; ++j) {
            id[zs[g].num[j]] = g;
            ++sum[zs[g].num[j]];
          }
          pd[g] = true;
          printf("Success\n");
        }
      } else
        printf("Already on\n");
    }
  }
}
