/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    
    vector<int> arr(n);
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    
    int overall_gcd;
    for(int i=0;i<n;i++)
    {
        overall_gcd=__gcd(overall_gcd,arr[i]);
    }
    
    long long suffix_mul[n];
    suffix_mul[n-1]=arr[n-1];
    for(int i=n-2;i>=0;i--)
    {
        suffix_mul[i]=suffix_mul[i+1]*arr[i];
    }
    
    bool is_pairwise=true;
    for(int i=0;i<n;i++)
    {
        if(i!=n-1)
        {
            if(__gcd(arr[i],suffix_mul[i+1])>1)
            {
                is_pairwise=false;
                break;
            }
        }
    }
    
    if(is_pairwise)
    {
        cout<<"pairwise coprime"<<endl;
    }
    else if(overall_gcd==1)
    {
        cout<<"setwise coprime"<<endl;
    }
    else
    {
        cout<<"not coprime"<<endl;
    }
    
    return 0;
}
