#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const long long MOD = 1000000007;
const long long INF = 1e18;
const long long MAX_N = 201010;
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
long long lcm(long long x, long long y) {
  if (x == 0 || y == 0) return 0;
  return (x / gcd(x, y) * y);
}
long long dx[4] = {0, 0, -1, 1};
long long dy[4] = {-1, 1, 0, 0};
long long ans[110][110];
bool flag[2][110];
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  map<long long, long long> mp;
  bool flag2 = true;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
    if (flag2) {
      for (long long j = 1; j <= sqrt(a[i]); ++j) {
        if (a[i] % j == 0) {
          if (mp[j] || mp[a[i] / j]) {
            flag2 = false;
            break;
          }
          if (a[i] / j == j) {
            mp[j]++;
          } else {
            if (j != 1) mp[j]++;
            mp[a[i] / j]++;
          }
        }
      }
    }
  }
  if (flag2) {
    puts("pairwise coprime");
    return 0;
  }
  long long res2 = a[0];
  for (long long i = 0; i < n - 1; ++i) {
    res2 = gcd(res2, a[i + 1]);
  }
  if (res2 == 1) {
    puts("setwise coprime");
    return 0;
  }
  puts("not coprime");
  return 0;
}
