#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int primes[N], cnt;
bool st[N];
int a[N];
void get_primes(int n) {
  for (int i = 2; i <= n; i++) {
    if (!st[i]) primes[cnt++] = i;
    for (int j = 0; primes[j] <= n / i; j++) {
      st[primes[j] * i] = true;
      if (i % primes[j] == 0) break;
    }
  }
}
bool is_prime(int x) {
  if (x < 2) return false;
  for (int i = 2; i <= x / i; i++)
    if (x % i == 0) return false;
  return true;
}
int st2[N];
int main() {
  get_primes(1010000);
  int flag = 1;
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    if (st2[a[i]] && is_prime(a[i])) flag = 2;
    scanf("%d", &a[i]);
    st2[a[i]]++;
  }
  if (st2[a[n]] == n && is_prime(a[n])) flag = 3;
  int flag1 = 1;
  for (int i = 0; i < cnt; i++) {
    int prime = primes[i];
    int cnt1 = 0;
    for (int j = 1; j <= n; j++) {
      if (a[j] % prime == 0) cnt1++;
    }
    if (cnt1 == n) {
      flag1 = 3;
      break;
    } else if (cnt1 > 1) {
      flag1 = 2;
      break;
    }
  }
  if (flag == 2 || flag1 == 2)
    cout << "setwise coprime" << endl;
  else if (flag == 3 || flag1 == 3)
    cout << "not coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
  return 0;
}
