#include <bits/stdc++.h>
using namespace std;
bool vi[100010];
int ocu[100010];
int check(int n, bool ty) {
  if (ty) {
    for (int i = 2; i * i <= n; ++i)
      if (n % i == 0) {
        if (ocu[i] != 0) return ocu[i];
        if (ocu[n / i] != 0) return ocu[n / i];
      }
    if (ocu[n] != 0) return ocu[n];
  }
  for (int i = 2; i * i <= n; ++i)
    if (n % i == 0) {
      if (ty)
        ocu[i] = n;
      else
        ocu[i] = 0;
      if (ty)
        ocu[n / i] = n;
      else
        ocu[n / i] = 0;
    }
  if (ty)
    ocu[n] = n;
  else
    ocu[n] = 0;
  vi[n] = ty;
  return -1;
}
int main() {
  int n, m, tmp;
  char str[10];
  while (scanf("%d%d", &n, &m) == 2) {
    memset(vi, 0, sizeof(vi));
    memset(ocu, 0, sizeof(ocu));
    for (int i = 0; i < m; ++i) {
      scanf("%s%d", str, &tmp);
      if (str[0] == '+') {
        if (vi[tmp])
          printf("Already on\n");
        else {
          tmp = check(tmp, 1);
          if (tmp == -1)
            printf("Success\n");
          else
            printf("Conflict with %d\n", tmp);
        }
      } else if (!vi[tmp])
        printf("Already off\n");
      else
        check(tmp, 0), printf("Success\n");
    }
  }
  return 0;
}
