#include <bits/stdc++.h>
using namespace std;
int hx[] = {-2, -2, -1, -1, 1, 1, 2, 2};
int hy[] = {-1, 1, -2, 2, -2, 2, -1, 1};
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int nx[] = {1, -1, 0, 0, -1, 1, 1, -1};
int ny[] = {0, 0, 1, -1, 1, -1, 1, -1};
class pt {
 public:
  int x, y;
};
int main() {
  int t = 1;
  while (t--) {
    int n = ({
      int x;
      scanf("%d", &x);
      x;
    }),
        m = ({
          int x;
          scanf("%d", &x);
          x;
        });
    int on[n + 10], pr[n + 10], num[n + 10];
    memset(on, 0, sizeof on);
    ;
    memset(pr, 0, sizeof pr);
    ;
    memset(num, 0, sizeof num);
    ;
    for (int i = 0; i < m; i++) {
      char ch;
      scanf("%*c%c ", &ch);
      int x = ({
        int x;
        scanf("%d", &x);
        x;
      });
      if (ch == '-') {
        if (on[x] == 0)
          printf("Already off\n");
        else {
          printf("Success\n");
          int k = sqrt(x);
          for (int j = 2; j <= k; j++) {
            if (x % j == 0) {
              pr[j] = 0;
              pr[x / j] = 0;
            }
          }
          pr[x] = 0;
          on[x] = 0;
        }
      } else {
        if (on[x] == 1)
          printf("Already on\n");
        else {
          if (pr[x] == 1) {
            printf("Conflict with %d\n", num[x]);
            continue;
          }
          int fl = 1;
          int k = sqrt(x);
          for (int j = 2; j <= k; j++) {
            if (x % j == 0) {
              if (pr[j] == 1) {
                printf("Conflict with %d\n", num[j]);
                fl = 0;
                break;
              }
              if (pr[x / j] == 1) {
                printf("Conflict with %d\n", num[x / j]);
                fl = 0;
                break;
              }
            }
          }
          if (fl) {
            printf("Success\n");
            on[x] = 1;
            int k = sqrt(x);
            for (int j = 2; j <= k; j++) {
              if (x % j == 0) {
                pr[j] = 1;
                pr[x / j] = 1;
                num[j] = num[x / j] = x;
              }
            }
            pr[x] = 1;
            num[x] = x;
          }
        }
      }
    }
  }
  return 0;
}
