#include <bits/stdc++.h>
bool vis[(2000005)];
int pri[(2000005)], pcnt;
int gcd(const int &a, const int &b) { return b ? gcd(b, a % b) : a; }
int n, g;
int s[(2000005)];
int used[(2000005)];
int main() {
  for (int i = 2; i < (2000005); ++i) {
    if (!vis[i]) {
      pri[pcnt++] = i;
    }
    for (int j = 0; j < pcnt; ++j) {
      if ((long long)i * pri[j] >= (2000005)) break;
      if (vis[i * pri[j]]) break;
      vis[i * pri[j]] = true;
    }
  }
  scanf("%d", &n);
  scanf("%d", &s[0]);
  g = s[0];
  for (int i = 1; i < n; ++i) {
    scanf("%d", &s[i]);
    g = gcd(g, s[i]);
  }
  if (g != 1) {
    printf("not coprime\n");
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; s[i] > 1 && j < pcnt; ++j) {
      if (s[i] % pri[j] == 0) {
        if (used[j]) {
          printf("setwise coprime\n");
          return 0;
        }
        used[j] = true;
        while (s[i] > 1 && s[i] % pri[j] == 0) s[i] /= pri[j];
      }
    }
  }
  printf("pairwise coprime\n");
  return 0;
}
