#include <bits/stdc++.h>
using namespace std;
int n, m;
int g[100005];
bool p[100005];
int main() {
  scanf("%d %d\n", &n, &m);
  for (int i = 0; i < m; ++i) {
    int x;
    char c;
    scanf("%c %d\n", &c, &x);
    if (p[x] && c == '+') {
      puts("Already on");
      continue;
    }
    if (!p[x] && c == '-') {
      puts("Already off");
      continue;
    }
    bool flag = 1;
    for (int j = 2; j * j <= x && flag; ++j)
      if (x % j == 0 && c == '+' && (g[j] || g[x / j])) {
        printf("Conflict with %d\n", (g[j] ? g[j] : g[x / j]));
        flag = 0;
      }
    if (c == '+' && g[x] && flag) {
      printf("Conflict with %d\n", g[x]);
      flag = 0;
    }
    if (!flag) continue;
    puts("Success");
    p[x] = (c == '+');
    g[x] = (c == '+' ? x : 0);
    for (int j = 2; j * j <= x; ++j)
      if (x % j == 0) {
        g[j] = (c == '+' ? x : 0);
        g[x / j] = (c == '+' ? x : 0);
      }
  }
  return 0;
}
