#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 9999999999999999;
using ll = long long;
typedef pair<int,int> P;
int N;
int M;
int a[1000000];
vector <int> sosuu;
int arr[1000000];


void Eratosthenes(){
	for(int i = 0; i < N; i++){
		arr[i] = 1;
	}
  arr[0] = 0;
  arr[1] = 0;
	for(int i = 2; i < sqrt(N); i++){
		if(arr[i]){
			for(int j = 0; i * (j + 2) < N; j++){
				arr[i *(j + 2)] = 0;
			}
		}
	}

	for(int i = 2; i < N; i++){
		if(arr[i]){
			sosuu.push_back(i);
		}
	}
}






int main(){
  cin>>M;
  for(int i = 0;i<M;i++){
    cin>>a[i];
  }
  N = 1000000;
  Eratosthenes();
  int ans = 0;
  for(int i = 0;i<3000;i++){
    int temp = 0;
    for(int k = 0;k<M;k++){
      if(a[k]%sosuu[i] == 0){
        temp++;
      }
    }
    if(temp > 1){
      ans = 1;
    }
  }
  if(ans == 0){
    cout << "pairwise coprime"<< endl;
  }
  else{
    int temp2 = a[0];
    for(int i = 0;i<M;i++){
      temp2 = gcd(temp2,a[i]);
    }
    if(temp2 == 1){
      cout << "setwise coprime" << endl;
    }
    else{
      cout << "not coprime" << endl;
    }
  }
 // cout << sosuu.size() << endl;
  return 0;
}