#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6;
vector<int> isprime(MAX + 1, 1), uoc(MAX + 1);
void sieve() {
  for (int i = 1; i <= MAX; i++) uoc[i] = i;
  isprime[0] = 0;
  isprime[1] = 0;
  for (int i = 2; i * i <= MAX; i++) {
    if (isprime[i])
      for (int j = i * i; j <= MAX; j += i) {
        isprime[j] = 0;
        if (uoc[j] == j) uoc[j] = i;
      }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  sieve();
  vector<int> mark((int)1e6 + 1, 0);
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    int pre = 0;
    while (uoc[x] != 1) {
      if (uoc[x] != pre) mark[uoc[x]]++, pre = uoc[x];
      x /= uoc[x];
    }
  }
  int ma = *max_element(mark.begin(), mark.end());
  if (ma == 1)
    cout << "pairwise coprime";
  else if (ma != n)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
