#include <bits/stdc++.h>
using namespace std;
vector<int> divs[111111];
int is_pr[111111];
int is_on[111111];
int in_use[111111];
int n, m;
char data[1111];
int main() {
  gets(data);
  sscanf(data, "%d%d", &n, &m);
  for (int i = 2; i <= n; ++i) {
    is_pr[i] = 1;
  }
  for (int i = 2; i * i <= n; ++i) {
    if (is_pr[i]) {
      for (int j = i * i; j <= n; j += i) {
        is_pr[j] = 0;
      }
    }
  }
  for (int i = 2; i <= n; ++i) {
    if (is_pr[i]) {
      for (int j = i; j <= n; j += i) {
        divs[j].push_back(i);
      }
    }
  }
  for (int i = 0; i < m; ++i) {
    gets(data);
    char sym;
    int val;
    sscanf(data, "%c%d", &sym, &val);
    if (sym == '+') {
      if (in_use[val]) {
        printf("Already on\n");
      } else {
        bool ok = 1;
        for (int j = 0; j < (int)((divs[val]).size()); ++j) {
          int divisor = divs[val][j];
          if (is_on[divisor]) {
            printf("Conflict with %d\n", is_on[divisor]);
            ok = 0;
            break;
          }
        }
        if (ok) {
          for (int j = 0; j < (int)((divs[val]).size()); ++j) {
            int divisor = divs[val][j];
            is_on[divisor] = val;
          }
          in_use[val] = 1;
          printf("Success\n");
        }
      }
    } else {
      if (!in_use[val]) {
        printf("Already off\n");
      } else {
        in_use[val] = 0;
        for (int j = 0; j < (int)((divs[val]).size()); ++j) {
          int divisor = divs[val][j];
          is_on[divisor] = 0;
        }
        printf("Success\n");
      }
    }
  }
}
