#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int a[1000010];
bool cnt[1010000];
int prime[1010];
int cntt;
bool isprime(int n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
int main() {
  int n;
  cin >> n;
  int g = 0;
  for (int i = 1; i <= n; i++) cin >> a[i], g = gcd(g, a[i]);
  for (int i = 2; i <= 1000; i++)
    if (isprime(i)) prime[cntt++] = i;
  if (g != 1) {
    printf("not coprime\n");
    return 0;
  } else {
    bool flag = true;
    for (int i = 1; i <= n; i++)
      for (int j = 0; j < cntt && prime[j] * prime[j] <= a[i]; j++) {
        int pj = prime[j];
        if (a[i] % pj == 0) {
          if (cnt[pj]) {
            flag = false;
            break;
          }
          cnt[pj] = true;
          while (a[i] % pj == 0) a[i] /= pj;
        }
        if (a[i] != 1) {
          if (cnt[a[i]]) flag = false;
          cnt[a[i]] = true;
        }
        if (!flag) break;
      }
    if (!flag)
      cout << "setwise coprime" << endl;
    else
      cout << "pairwise coprime" << endl;
  }
}
