#include<bits/stdc++.h>
using namespace std;

int main()
{

    long long n; 

    cin>>n; 

    long long a[n];

    for(int i=0 ; i <n;i++ )
    cin>>a[i];

    int flag =0 ; 
    for(int i=0 ; i<n;i++ )
    {
        for(int j =i +1 ; j<n; j++ )
        {
            if(__gcd(a[i],a[j]) != 1 )
            {
                flag  =1 ; 
                break; 
            }
        }
        if(flag ==1 )
        {
            break ; 
        }
    }
    if(flag == 0)
    {
        cout<<"pairwise coprime"; 
    }

     
    if(flag == 1)
    {
        long long int ans  = a[0]; 
        for(int i=1 ;i<n;i++ )
        {

            ans = __gcd(ans , a[i]);

        }

        if(ans == 1)
        {
            cout<<"setwise coprime";
        }
        else 
        {
            cout<<"not coprime";
        }
        
    }
    
    

    



}