#include <bits/stdc++.h>
using namespace std;
int divi[100010];
bool ex[100010];
int findi[100010];
int N, M;
void off(int j) {
  int n, i;
  if (!ex[j]) {
    printf("Already off\n");
    return;
  }
  n = (int)sqrt(j);
  for (i = 2; i <= n; i++)
    if (j % i == 0) {
      divi[i] = 0;
      divi[j / i] = 0;
    }
  divi[j] = 0;
  ex[j] = false;
  printf("Success\n");
}
void on(int j) {
  int n, i, x;
  if (ex[j]) {
    printf("Already on\n");
    return;
  }
  n = (int)sqrt(j);
  for (i = 2; i <= n; i++)
    if (j % i == 0)
      if (divi[i] != 0 || divi[j / i] != 0) {
        if (divi[i] != 0)
          x = i;
        else
          x = j / i;
        printf("Conflict with %d\n", findi[x]);
        return;
      }
  if (divi[j] != 0) {
    printf("Conflict with %d\n", findi[j]);
    return;
  }
  divi[j] = 1;
  findi[j] = j;
  for (i = 2; i <= n; i++)
    if (j % i == 0) {
      divi[i] = 1;
      divi[j / i] = 1;
      findi[i] = j;
      findi[j / i] = j;
    }
  ex[j] = true;
  printf("Success\n");
  return;
}
int main() {
  scanf("%d %d\n", &N, &M);
  char c;
  int i, j;
  for (i = 0; i < M; i++) {
    scanf("%c %d\n", &c, &j);
    if (c == '-')
      off(j);
    else
      on(j);
  }
}
