#include <bits/stdc++.h>
using namespace std;
int n, m, mx, now, tim, a[1000001];
bool v[1000001];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    mx = max(a[i], mx);
    v[a[i]] = 1;
  }
  sort(a + 1, a + 1 + n);
  now = gcd(a[1], a[2]);
  for (int i = 3; i <= n; i++) now = gcd(now, a[i]);
  if (now != 1) {
    printf("not coprime");
    return 0;
  }
  for (int i = 2; i <= mx; i++) {
    long long now = i;
    int num = 0;
    for (int j = 2;; j++) {
      now = i * j;
      tim++;
      if (now > mx) break;
      if (v[now]) num++;
      if (tim > 80000000) {
        printf("pairwise coprime");
        return 0;
      }
      if (num == 2) {
        printf("setwise coprime");
        return 0;
      }
    }
  }
  printf("pairwise coprime");
  return 0;
}
