#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef pair<ll,ll> pll;
typedef vector<ll> vll;
typedef vector<pll> vpll;
typedef vector<vll> vvll;

#define all(x) (x).begin(), (x).end()
#define fi first
#define se second

int main() 
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    int arr[n];

    for(int i=0;i<n;i++){
    	cin >> arr[i];
    }

    bool yes = true;
    int ans1 = arr[n-1];
	for(int i=n-2;i>=0;i--){
		ans1 = __gcd(arr[i],ans1);
		if(ans1 != 1) {
			yes = false;
			break;
		}
	}

    if(yes) {
    	cout<<"pairwise coprime"<<"\n";
    	return 0;
	}

	int ans = arr[0];
	for(int i=1;i<n;i++){
		ans = __gcd(arr[i],ans);
		if(ans == 1) break;
	}

    if(ans == 1) cout<<"setwise coprime"<<"\n";
    else cout<<"not coprime"<<"\n";
    return 0;
}
