#include <bits/stdc++.h>
using namespace std;
string ans_Yes = "Yes";
string ans_No = "No";
string ans_yes = "yes";
string ans_no = "no";
vector<long long> A;
long long B;
long long C;
long long N;
long long M;
long long K;
long long ltmp;
string stmp;
double dtmp;
vector<long long> prime_numbers;
void getPrimeNumbers(long long n_max) {
  bool is_prime[n_max + 1];
  for (long long ni = 0; ni <= n_max; ni++) {
    is_prime[ni] = true;
  }
  is_prime[0] = is_prime[1] = false;
  for (long long number = 2; number <= n_max; number++) {
    if (is_prime[number]) {
      prime_numbers.push_back(number);
      for (long long ni = number * 2; ni <= n_max; ni += number) {
        is_prime[ni] = false;
      }
    }
  }
}
long long llmin(long long a, long long b) {
  if (a >= b) return b;
  return a;
}
long long llmax(long long a, long long b) {
  if (a <= b) return b;
  return a;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> N;
  for (long long ni = 0; ni < (N); ni++) {
    cin >> ltmp;
    A.push_back(ltmp);
  }
  sort(A.begin(), A.end());
  getPrimeNumbers(A[N - 1] + 1);
  long long ji_start = 0;
  long long cnt_max = 0;
  for (long long pi = 0; pi < (prime_numbers.size()); pi++) {
    long long pval = prime_numbers[pi];
    long long cnt = 0;
    for (long long ji = ji_start; ji < N; ji++) {
      if (pval > A[ji])
        ji_start++;
      else if (A[ji] % pval == 0)
        cnt++;
    }
    cnt_max = llmax(cnt_max, cnt);
    if (cnt_max == N)
      break;
    else if (cnt_max > 1 && ji_start > 0)
      break;
  }
  if (cnt_max == N)
    cout << "not coprime" << endl;
  else if (cnt_max > 1)
    cout << "setwise coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
}
