#include <bits/stdc++.h>
using namespace std;
const long double epsylon = 1e-9;
const int size = 100100;
int devs[size];
int numbers[size];
int on[size];
void pc() {
  memset(devs, -1, sizeof(devs));
  devs[1] = 1;
  for (int i = 2; i < size; ++i) {
    if (devs[i] != -1) {
      continue;
    }
    devs[i] = i;
    if (i < 10000) {
      for (int j = i * i; j < size; j += i) {
        if (devs[j] == -1) {
          devs[j] = i;
        }
      }
    }
  }
}
int n, m;
int main() {
  pc();
  cin >> n >> m;
  memset(numbers, -1, sizeof(numbers));
  memset(on, 0, sizeof(on));
  char buf[2];
  int val;
  for (int i = 0; i < m; ++i) {
    scanf("%s %d", buf, &val);
    if (buf[0] == '+') {
      if (on[val]) {
        printf("Already on\n");
        continue;
      }
      int t = val;
      int conf = -1;
      while (t != 1) {
        if (numbers[devs[t]] != -1) {
          conf = numbers[devs[t]];
          break;
        }
        t = t / devs[t];
      }
      if (conf == -1) {
        printf("Success\n");
        on[val] = 1;
        int u = val;
        while (u != 1) {
          numbers[devs[u]] = val;
          u = u / devs[u];
        }
        continue;
      } else {
        printf("Conflict with %d\n", conf);
        continue;
      }
    } else {
      if (on[val] == 0) {
        printf("Already off\n");
        continue;
      } else {
        printf("Success\n");
        on[val] = 0;
        int u = val;
        while (u != 1) {
          numbers[devs[u]] = -1;
          u = u / devs[u];
        }
        continue;
      }
    }
  }
  return 0;
}
