#include <bits/stdc++.h>
using namespace std;
const int maxint = -1u >> 1;
int state[100010] = {0};
int prime[120000];
vector<int> p[100010];
int vis[100010];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 2; i <= n; i++) {
    if (!vis[i]) {
      for (int j = i; j <= n; j += i) {
        vis[j] = 1;
        p[j].push_back(i);
      }
    }
  }
  memset(vis, 0, sizeof(vis));
  while (m--) {
    char str[2];
    int id;
    scanf("%s%d", &str[0], &id);
    if (str[0] == '+') {
      if (state[id]) {
        puts("Already on");
        continue;
      }
      int f = 0;
      for (int i = 0; i < p[id].size(); i++) {
        if (vis[p[id][i]] > 0) {
          f = vis[p[id][i]];
          break;
        }
      }
      if (f == 0) {
        puts("Success");
        for (int i = 0; i < p[id].size(); i++) {
          vis[p[id][i]] = id;
        }
        state[id] = 1;
      } else {
        printf("Conflict with %d\n", f);
      }
    } else {
      if (state[id] == 0) {
        puts("Already off");
        continue;
      }
      puts("Success");
      state[id] = 0;
      for (int i = 0; i < p[id].size(); i++) {
        vis[p[id][i]] = 0;
      }
    }
  }
  return 0;
}
