#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int n, flag = 0;
unsigned long long tot, totgcd, num[N];
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%ulld", &num[i]);
  totgcd = num[1];
  tot = num[1];
  for (int i = 2; i <= n; ++i) {
    totgcd = gcd(totgcd, num[i]);
    if (gcd(tot, num[i]) != 1) flag = 1;
    tot *= num[i];
  }
  if (totgcd != 1) {
    printf("not coprime\n");
    return 0;
  }
  if (flag)
    printf("setwise coprime\n");
  else
    printf("pairwise coprime\n");
  return 0;
}
