#include <bits/stdc++.h>
using namespace std;
bool sieve[1000001] = {false};
vector<pair<int, int> > primes;
int arr[1000001] = {0};
int gcd(int A, int B) {
  if (A == 0) return B;
  if (B == 0) return A;
  return gcd(B, A % B);
}
int lgcd(unsigned long long A, unsigned long long B) {
  if (A == 0) return B;
  if (B == 0) return A;
  return lgcd(B, A % B);
}
unsigned long long lcm(unsigned long long A, unsigned long long B) {
  return A * B / lgcd(A, B);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  for (int i = 2; i < 1000001; i++) {
    if (sieve[i]) continue;
    primes.push_back(make_pair(i, 0));
    for (int j = i * 2; j < 1000001; j += i) {
      sieve[j] = true;
    }
  }
  int N;
  cin >> N;
  int totalgcd = 0;
  unsigned long long totallcm = 1;
  int ispairwise = true;
  for (int i = 0; i < N; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < N; i++) {
    totalgcd = gcd(arr[i], totalgcd);
    if (arr[i] != 0)
      if (lgcd(arr[i], totallcm) != 1) ispairwise = false;
    totallcm = lcm(arr[i], totallcm);
  }
  if (ispairwise) {
    cout << "pairwise coprime" << endl;
  } else if (totalgcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
