#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool setwise_coprime(long long a[], long long n) {
  long long res = a[0];
  for (long long i = 1; i < n; i++) res = gcd(a[i], res);
  if (res == 1)
    return true;
  else
    return false;
}
bool pairwise_coprime(long long a[], long long n) {
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    long long x = a[i];
    for (long long j = 1; j * j <= x; j++) {
      if (x % j == 0) {
        if (j != 1) mp[j]++;
        if (x / j != j and j != 1) mp[x / j]++;
      }
    }
  }
  for (auto i : mp) {
    if (i.second >= 2) return false;
  }
  return true;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  if (pairwise_coprime(a, n))
    cout << "pairwise coprime"
         << "\n";
  else if (setwise_coprime(a, n))
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
  return 0;
}
