#include <bits/stdc++.h>
using namespace std;
int main () {
  long N;
  cin >> N;
  vector<long> data(N), o(1000001);
  long flag = 1;
  for(int i = 0; i < N; i++)cin >> data.at(i);
  long a;
  for(int i = 0; i < N; i++){
    a = data.at(i);
    for(int j = 2; j <= sqrt(data.at(i)); j++){
      if(a % j == 0){
        o.at(j)++;
        if(o.at(j) >= 2)flag = 0;
        while(a % j == 0)a /= j;
        if(a == 1)break;
      }
    }
    if(flag == 0)break;
  }
  if(flag == 1){
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long g = data.at(0);
  for(int i = 1; i < N; i++){
    g = __gcd(g, data.at(i));
  }
  if(g == 1){
    cout << "setwise coprime" << endl;
  } else cout << "not coprime" << endl;
  return 0;
}