#include <bits/stdc++.h>
using namespace std;
int N, Q;
int h[114514];
bool f[114514];
char c;
int A;
int main() {
  scanf("%d%d", &N, &Q);
  while (Q--) {
    scanf(" %c%d", &c, &A);
    if (c == '+') {
      if (f[A])
        puts("Already on");
      else {
        int tt = A;
        int cc = -1;
        for (int k = 2; k * k <= tt; k++)
          if (tt % k == 0) {
            while (tt % k == 0) tt /= k;
            if (h[k]) cc = h[k];
          }
        if (tt != 1 && h[tt]) cc = h[tt];
        if (cc == -1) {
          puts("Success");
          f[A] = true;
          tt = A;
          for (int k = 2; k * k <= tt; k++)
            if (tt % k == 0) {
              while (tt % k == 0) tt /= k;
              h[k] = A;
            }
          if (tt != 1) h[tt] = A;
        } else
          printf("Conflict with %d\n", cc);
      }
    } else {
      if (!f[A])
        puts("Already off");
      else {
        int tt = A;
        for (int k = 2; k * k <= tt; k++)
          if (tt % k == 0) {
            while (tt % k == 0) tt /= k;
            h[k] = 0;
          }
        if (tt != 1) h[tt] = 0;
        f[A] = false;
        puts("Success");
      }
    }
  }
}
