#include <iostream>
#include <algorithm>

using namespace std;

int main() {
 	int n;
  	cin >> n;
  	int arr[n];
  	
  	for (int i = 0; i < n; i++) {
     	cin >> arr[i]; 
    }
  
  	int gcd = arr[0];
  	bool pair = 1;
  	for (int i = 1; i < n; i++) {
     	gcd = __gcd(gcd, arr[i]);
      	if (gcd != 1) pair = 0;
    }
  
  	if (pair) {
     	cout << "pairwise coprime" << endl; 
    } else if (!pair && gcd == 1) {
     	cout << "setwise coprime" << endl; 
    } else {
     	cout << "not coprime" << endl; 
    }
  	return 0;
}