#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;

int main(){
  int N;
  cin >> N;
  vector<int> A{};
  int a;
  rep(i, N){
    cin >> a;
    A.push_back(a);
  }
  const int M = 1000000;
  int num[M] = {0};
  int n;
  num[0] = 1;
  rep(i, M){
    if(num[i] == 0){
      if(i + 1 > sqrt(M))
        break;
      n = 2 * (i + 1);
      while(n <= M){
        num[n-1] = 1;
        n += (i + 1);
      }
    }
  }
  vector<int> primes = {};
  rep(i, M){
    if(num[i] == 0)
      primes.push_back(i+1);
  }
  int l = primes.size();
  int B[l] = {0};
  int j;
  rep(i, N){
    j = 0;
    while(A[i] > 1){
      if(A[i] % primes[j] == 0)
        B[j] += 1;
      while(A[i] % primes[j] == 0)
        A[i] /= primes[j];
      j += 1;
    }
  }
  int x = 1, y = 1;
  rep(i, l){
    if(B[i] >= 2)
      x = 0;
    if(B[i] == N)
      y = 0;
  }
  if(x == 1)
    cout << "pairwise coprime" << endl;
  else if(y == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}