#include <bits/stdc++.h>
using namespace std;
int prime[10005];
int act[100008];
int p[100008][20];
int vis[100008], ans;
int a[100008];
void init(int x) {
  x++;
  int i, j;
  ans = 0;
  memset(vis, 0, sizeof(vis));
  p[1][0] = 1;
  act[1] = 0;
  a[1] = 0;
  for (i = 2; i < x; i++) {
    p[i][0] = 1;
    act[i] = 0;
    a[i] = 0;
    if (vis[i]) continue;
    prime[ans] = i;
    ans++;
    for (j = 2 * i; j < x; j += i) vis[j] = 1;
  }
}
void div(int x) {
  int i, j, num = 0;
  for (i = 0; prime[i] <= x / 2; i++) {
    if (x % prime[i] == 0) {
      int u = p[x][0];
      p[x][u] = prime[i];
      p[x][0]++;
    }
  }
  if (vis[x] == 0) {
    int u = p[x][0];
    p[x][u] = x;
    p[x][0]++;
  }
}
void active(int x) {
  if (act[x]) {
    printf("Already on\n");
    return;
  }
  int i, j;
  for (i = 1; i < p[x][0]; i++) {
    if (a[p[x][i]]) {
      printf("Conflict with %d\n", a[p[x][i]]);
      return;
    }
  }
  act[x] = 1;
  for (i = 1; i < p[x][0]; i++) a[p[x][i]] = x;
  printf("Success\n");
}
void post(int x) {
  if (act[x] == 0) {
    printf("Already off\n");
    return;
  }
  int i;
  act[x] = 0;
  for (i = 1; i < p[x][0]; i++) a[p[x][i]] = 0;
  printf("Success\n");
}
int main() {
  int i, j, n, m, x;
  char s[10];
  scanf("%d%d", &n, &m);
  init(n);
  p[1][0] = 1;
  p[1][1] = 1;
  for (i = 2; i <= n; i++) div(i);
  for (i = 0; i < m; i++) {
    scanf("%s %d", s, &x);
    if (s[0] == '+')
      active(x);
    else
      post(x);
  }
  return 0;
}
