#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000005;
int a[MAXN], prime[MAXN];
bool check[MAXN];
bool vis[MAXN];
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int pcnt;
void getprime() {
  for (int i = 2; i <= MAXN - 5; i++) {
    if (!vis[i]) prime[pcnt++] = i;
    for (int j = 0; j < pcnt && i * prime[j] < MAXN; ++j) {
      vis[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
int main() {
  int n, fl = 0;
  getprime();
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    int tmp = a[i];
    for (int j = 0; j <= pcnt - 1; j++) {
      if (prime[j] > a[n]) break;
      if (tmp % prime[j] == 0 && check[prime[j]]) {
        fl = 1;
        break;
      }
      while (tmp % prime[j] == 0) {
        tmp /= prime[j];
        check[prime[j]] = 1;
      }
    }
    if (fl == 1) break;
  }
  if (fl) {
    int setfl = 0;
    int last = a[1];
    for (int i = 2; i <= n; i++) {
      last = gcd(last, a[i]);
      if (last == 1) {
        cout << "setwise";
        setfl = 1;
        break;
      }
    }
    if (!setfl) cout << "no";
  } else {
    cout << "pairwise";
  }
  cout << " coprime" << endl;
  return 0;
}
