#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
const int maxn = 1e6 + 7;
int prime[maxn + 1];
void getPrime() {
  prime[0] = 0;
  for (int i = 2; i < maxn - 7; i++) {
    if (!prime[i]) prime[++prime[0]] = i;
    for (int j = 1; j <= prime[0] && prime[j] <= maxn / i; j++) {
      prime[prime[j] * i] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
int a[maxn];
map<int, int> mp;
int main() {
  getPrime();
  int n;
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) {
    scanf("%d", &a[i]);
  }
  for (int i = (1); i <= (n); i++) {
    for (int j = 1; prime[j] <= a[i]; j++) {
      if (a[i] % prime[j] == 0) {
        mp[prime[j]]++;
        while (a[i] % prime[j] == 0) {
          a[i] /= prime[j];
        }
      }
    }
  }
  int flag = 0;
  for (auto temp : mp) {
    if (temp.second >= 2) {
      flag++;
    }
  }
  if (flag == 0)
    puts("pairwise coprime");
  else if (flag == n)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
