#include <bits/stdc++.h>
using namespace std;
constexpr long long mod = 1000000007;
constexpr long long INF = (1ll << 60);
constexpr double pi = 3.14159265358979323846;
template <typename T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
vector<long long> sum;
void pre_process(vector<long long> &a, vector<long long> &s) {
  long long n = (long long)a.size();
  s.assign(n + 1, 0);
  s[0] = a[0];
  for (long long i = 0; i < n; i++) {
    s[i + 1] = gcd(s[i], a[i]);
  }
}
vector<long long> prime_num(1000001, 0);
vector<bool> prime(1000001, true);
bool isprime(long long N) {
  bool ans = false;
  if (N >= 0) prime[0] = false;
  if (N >= 1) prime[1] = false;
  for (long long i = 2; i * i <= N; i++) {
    if (!prime[i]) {
      continue;
    }
    long long cnt = 0;
    if (prime_num[i] >= 1) cnt++;
    for (long long j = i * i; j <= N; j += i) {
      prime[j] = false;
      if (prime_num[j] >= 1) {
        cnt++;
      }
    }
    if (cnt >= 2) {
      ans = true;
      break;
    }
  }
  return ans;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  bool ans1 = false;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
    prime_num[a[i]]++;
    if (prime_num[a[i]] >= 2) ans1 = true;
  }
  pre_process(a, sum);
  if (sum[n] == 1) {
    if (ans1 == true || isprime(1000001) == true) {
      cout << "setwise coprime\n";
    } else {
      cout << "pairwise coprime\n";
    }
  } else {
    cout << "not coprime\n";
  }
  return 0;
}
