#include <bits/stdc++.h>
int find(int b[][2], int x) {
  int i;
  for (i = 1; i * i <= x; i++)
    if (x % i == 0)
      if (b[i][0] == 1)
        return b[i][1];
      else if (b[x / i][0] == 1)
        return b[x / i][1];
  return -1;
}
void insert(int b[][2], int x) {
  int i;
  for (i = 1; i * i <= x; i++)
    if (x % i == 0) {
      b[i][0] = b[x / i][0] = 1;
      b[i][1] = b[x / i][1] = x;
    }
  b[1][1] = b[1][0] = 0;
  return;
}
void remov(int b[][2], int x) {
  int i;
  for (i = 1; i * i <= x; i++)
    if (x % i == 0) {
      b[i][0] = b[x / i][0] = 0;
      b[i][1] = b[x / i][1] = 0;
    }
  return;
}
int main() {
  int n, m, x, i, j, k;
  char c;
  scanf("%d %d", &n, &m);
  int a[100005] = {0}, b[100005][2] = {0};
  while (m--) {
    scanf(" %c %d", &c, &x);
    if (c == '+') {
      if (a[x] == 1)
        printf("Already on\n");
      else {
        k = find(b, x);
        if (k == -1) {
          printf("Success\n");
          insert(b, x);
          a[x] = 1;
        } else
          printf("Conflict with %d\n", k);
      }
    } else if (c == '-')
      if (a[x] == 0)
        printf("Already off\n");
      else {
        remov(b, x);
        a[x] = 0;
        printf("Success\n");
      }
  }
  return 0;
}
