#include <bits/stdc++.h>
using namespace std;
int s[1000001] = {0};
void sieve() {
  int maxn = 1000000;
  for (int i = 2; i < maxn + 1; i++) {
    if (s[i] == 0) {
      for (int j = i; j <= maxn; j += i) {
        if (s[j] == 0) s[j] = i;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  sieve();
  int n;
  ;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int check[n];
  memset(check, 0, sizeof(check));
  int setg = 0;
  int flag = 1;
  bitset<1000001> f[n];
  for (int i = 0; i < n; i++) {
    while (a[i] != 1) {
      f[i][s[a[i]]] = 1;
      a[i] /= s[a[i]];
    }
  }
  bitset<1000001> test;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      if ((f[i] & f[j]) != test) {
        flag = 0;
        break;
      }
    }
  }
  bitset<1000001> one;
  one = f[0];
  for (int i = 1; i < n; i++) {
    one = (one & f[i]);
  }
  if (one == test) setg = 1;
  if (flag == 1)
    cout << "pairwise coprime\n";
  else if (flag == 0 && setg == 1)
    cout << "setwise coprime\n";
  else if (flag == 0 && setg != 1)
    cout << "not coprime\n";
}
