#include <bits/stdc++.h>
using namespace std;
bool sieve[1000001] = {false};
vector<pair<int, int> > primes;
int arr[1000001] = {0};
map<pair<int, int>, int> dp;
int gcd(int A, int B) {
  if (A == 0) return B;
  if (B == 0) return A;
  auto key = make_pair(A, B);
  if (dp.count(key)) return (*(dp.find(key))).second;
  int res = gcd(B, A % B);
  dp.insert(make_pair(key, res));
  return res;
}
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;
  for (int i = 0; i < N; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < N; i++) {
    totalgcd = gcd(arr[i], totalgcd);
    for (auto it = primes.begin(); it != primes.end(); it++) {
      if ((*it).first > arr[i]) break;
      if (arr[i] % (*it).first == 0) (*it).second++;
    }
  }
  bool trigger = true;
  for (auto it = primes.begin(); it != primes.end(); it++) {
    if ((*it).second > 1) {
      trigger = false;
      break;
    }
  }
  if (trigger) {
    cout << "pairwise coprime" << endl;
  } else if (totalgcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
