#include <bits/stdc++.h>
using namespace std;
int n, m, p;
int pos[100005], mark[100005], div1[100005], cnt;
char c[10];
int main() {
  scanf("%d%d", &n, &m);
  while (m--) {
    scanf("%s%d", c, &p);
    if (c[0] == '+') {
      if (mark[p]) {
        cout << "Already on\n";
      } else {
        bool ok = true;
        cnt = 0;
        for (int i = 1; i * i <= p; i++)
          if (p % i == 0) {
            if (i != 1) div1[cnt++] = i;
            div1[cnt++] = p / i;
            if (pos[i]) {
              if (i != 1) {
                ok = false;
                printf("Conflict with %d\n", pos[i]);
                break;
              }
            }
            if (pos[p / i]) {
              printf("Conflict with %d\n", pos[p / i]);
              ok = false;
              break;
            }
          }
        if (ok) {
          cout << "Success\n";
          mark[p] = 1;
          for (int i = 0; i < cnt; i++) pos[div1[i]] = p;
        }
      }
    } else {
      if (mark[p]) {
        mark[p] = 0;
        cout << "Success\n";
        for (int i = 1; i * i <= p; i++)
          if (p % i == 0) {
            pos[i] = 0;
            pos[p / i] = 0;
          }
      } else
        cout << "Already off\n";
    }
  }
  return 0;
}
