#include <bits/stdc++.h>
using namespace std;
int f[100001][24], a[100001], n, m, on[100001];
int getch() {
  char c = getchar();
  while (c != '+' && c != '-') c = getchar();
  if (c == '+')
    return 1;
  else
    return 0;
}
void Init() {
  f[1][0] = 1;
  f[1][1] = 1;
  for (int i = 2; i <= 100000; ++i) {
    int x = i, y = int(sqrt(double(i)));
    for (int j = 2; j <= y; ++j)
      if (x % j == 0) {
        f[i][++f[i][0]] = j;
        while (x % j == 0) x /= j;
      }
    if (x != 1) f[i][++f[i][0]] = x;
  }
}
void Increase(int x) {
  if (on[x] == 1) {
    puts("Already on");
    return;
  }
  for (int i = 1; i <= f[x][0]; ++i)
    if (a[f[x][i]] != 0) {
      printf("Conflict with %d\n", a[f[x][i]]);
      return;
    }
  on[x] = 1;
  for (int i = 1; i <= f[x][0]; ++i) a[f[x][i]] = x;
  puts("Success");
}
void Decrease(int x) {
  if (on[x] == 0) {
    puts("Already off");
    return;
  }
  on[x] = 0;
  for (int i = 1; i <= f[x][0]; ++i) a[f[x][i]] = 0;
  puts("Success");
}
int main() {
  scanf("%d%d", &n, &m);
  Init();
  for (int i = 1; i <= m; ++i) {
    int x = getch(), y;
    scanf("%d", &y);
    if (x == 1)
      Increase(y);
    else
      Decrease(y);
  }
  return 0;
}
