
/*
ID: Bipin Singh [bipinsingh061]
LANG: C++
TASK: gift1
*/
#include<bits/stdc++.h> 
using namespace std; 
#define deb(x) cout <<"\n"<< (#x) << " = " << (x) << "\n"
#define int long long int

void inputoutput()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); 
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    
}

bool isprime(int n){
   //2 is considered as prime 

	if(n==1)
		return true;
   if(n==2){
        return true;
    }
    //if number is even then its not prime
    else if(n%2==0){
        return false;
    }
    else{
        //we can skip to check divisible by even numbers as the numbers which came to this else will only be odds
        for(int i=3;i*i<=n;i+=2){
            if(n%i==0){
                return false;
            }
        }
        return true;
    }
}



void dfs(int src , bool *vis , vector<int> v[] , int& ans)
{
	vis[src]=true;
	// cout<<src<<" ";
	++ans;
 
	for(auto it : v[src])
	{
		if(!vis[it])
			dfs(it,vis,v,ans);
	}
}

int mod=1e9+7 ;


void update(vector<int>& D, int l, int r, int x) 
{ 
    D[l] += x; 
    D[r + 1] -= x; 
}



int32_t main()
{
	inputoutput();


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

	bool ispaircp=true;

	int numberofprime=0;

	map<int,int> mp;

	for(int i=0 ; i<n ; ++i)
	{
		if(isprime(ar[i]))
		{
			++numberofprime;
			if(ar[i]!=1)
			mp[ar[i]]++;
		}
	}


	if(numberofprime==n || numberofprime==n-1)
		ispaircp=true;
	else
		ispaircp=false;

	for(auto it : mp)
	{
		if(it.second>1)
			ispaircp=false;
	}


	if(ispaircp)
		cout<<"pairwise coprime";
	else
	{

		int num=ar[0];

		for(int i=1 ; i<n ; ++i)
		{
			num=__gcd(num,ar[i]);
		}
		if(num==1)
			cout<<"setwise coprime";
		else
			cout<<"not coprime";
	}
	
	

    



	return 0;
}


