#include <bits/stdc++.h>
using namespace std;
int s[1111111];
bool t[1111111];
int r[1111111];
bool isLive[1111111];
int tot = 0;
void getPrime(int n) {
  t[1] = t[0] = true;
  int i = 2;
  while (i <= n) {
    if (t[i]) {
      i++;
      continue;
    }
    int j = i + i;
    r[++tot] = i;
    while (j <= n) {
      t[j] = true;
      j += i;
    }
    i++;
  }
}
int now[1111111];
int nowtot;
int check(int k) {
  nowtot = 0;
  if (!t[k]) {
    if (s[k])
      return s[k];
    else {
      now[++nowtot] = k;
      return 0;
    }
  }
  int temp = k;
  for (int i = 1; i <= tot; i++) {
    if (r[i] > k / r[i]) break;
    if (k % r[i] == 0) {
      if (s[r[i]])
        return s[r[i]];
      else
        now[++nowtot] = r[i];
      while (temp % r[i] == 0) temp /= r[i];
    }
  }
  if (temp != 1) {
    if (s[temp])
      return s[temp];
    else
      now[++nowtot] = temp;
  }
  return 0;
}
void add(int k) {
  for (int i = 1; i <= nowtot; i++) {
    s[now[i]] = k;
  }
}
void mimus(int k) {
  if (!t[k]) {
    s[k] = 0;
    return;
  }
  int temp = k;
  for (int i = 1; i <= tot; i++) {
    if (r[i] > k / r[i]) break;
    if (k % r[i] == 0) {
      s[r[i]] = 0;
      while (temp % r[i] == 0) temp /= r[i];
    }
  }
  if (temp != 1) s[temp] = 0;
}
int main() {
  int n, m;
  char ss[1000];
  cin >> n >> m;
  getPrime(100000);
  int j;
  for (int i = 1; i <= m; i++) {
    scanf("%s %d\n", ss, &j);
    if (ss[0] == '+') {
      if (isLive[j])
        printf("Already on\n");
      else {
        int tm = check(j);
        if (!tm) {
          add(j);
          isLive[j] = true;
          printf("Success\n");
        } else {
          printf("Conflict with %d\n", tm);
        }
      }
    } else {
      if (!isLive[j])
        printf("Already off\n");
      else {
        mimus(j);
        isLive[j] = false;
        printf("Success\n");
      }
    }
  }
  return 0;
}
