#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int lcm(long long int a, long long int b) {
  return (a / gcd(a, b)) * b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, i, j;
  cin >> n;
  long long int a[i];
  long long int prime[1000003];
  memset(prime, 0, sizeof(prime));
  for (i = 2; i < 1000001; i++) {
    if (prime[i] == 0) {
      for (j = i; j < 1000001; j += i) {
        prime[j] = i;
      }
    }
  }
  for (i = 0; i < n; i++) cin >> a[i];
  map<long long int, long long int> pf;
  for (i = 0; i < n; i++) {
    map<long long int, long long int> m;
    long long int x = a[i];
    while (x != 1) {
      if (m.find(prime[x]) == m.end()) {
        m.insert(make_pair(prime[x], 1));
      }
      x /= prime[x];
    }
    for (auto it : m) {
      if (pf.find(it.first) != pf.end())
        pf.find(it.first)->second++;
      else
        pf.insert(make_pair(it.first, 1));
    }
  }
  long long int flag1 = 0, flag2 = 0;
  for (auto it : pf) {
    if (it.second != 1) flag1 = 1;
    if (it.second == n) flag2 = 1;
  }
  if (flag1 == 0)
    cout << "pairwise coprime\n";
  else if (flag2 == 0)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
