#include<bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp> 
using namespace boost::multiprecision; 
using namespace std;

#define sync {ios_base ::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);}
#define ll cpp_int
#define mod 1000000007


int gcd(int a, int b)
{
    if(b==0)
        return a;
    
    return gcd(b,a%b);
    

}

bool gcda(int a[], int n)
{
    int ans = a[0];
    
    for(int i=0;i<n;i++)
    {
        ans = gcd(ans,a[i]);
    }
    
    return ans==1;
}


bool findlcm(int arr[], int n)
{
    ll ans = arr[0];
    ll product = arr[0];
  
    for (int i = 1; i < n; i++)
    {
        ans = (((arr[i] * ans))/(gcd(arr[i], ans)));
        product = (product*arr[i]);
        if(ans!=product)
            return false;
    }
  
    return true;
}
void solve()
{
    int n;
    cin>>n;
    
    int a[n];
    for(int i=0;i<n;i++)
        cin>>a[i];
    
    
    
    if(findlcm(a, n))
        cout<<"pairwise coprime";
    
    else if(gcda(a,n))
    {
        cout<<"setwise coprime";
    }
    
    else
        cout<<"not coprime";
}

int main()
{
    sync;
    int t = 1;
    //cin>>t;
    while(t--){
        solve();
        cout<<"\n";
    }
    return 0;
}





