#include<iostream>
using namespace std;
int findMaxGCD(long long int arr[] , long long int n)
{
   long long int high = 0;

    for (long long int i = 0; i < n; i++)
        high = max(high, arr[i]);

    long long int count[high+1] = {0};

    for (long long int i = 0; i < n; i++)
        count[arr[i]]++;

    long long int counter = 0;


    for (long long int i = high; i >= 1; i--)
    {
        long long int j = i;
       counter = 0;


        while (j <= high)
        {


            if(count[j] >=2)
               return j;

           else if (count[j] == 1)
                counter++;


            j += i;


            if (counter == 2)
                return i;
        }
    }
}
int gcd(long long int a, long long int b)
{
    if(b==0)
        return a;
    return gcd(b , a%b);
}
int main()
{
    long long int n;cin>>n;
    long long int a[n],r=0;
    cin>>a[0];
    r=a[0];
    int f=1;
    for(long long int i=1;i<n;i++)
    {
        cin>>a[i];
        if(r<=a[i])
        r=gcd(a[i] , r);
        else
        r=gcd(r,a[i]);
    }
    f=findMaxGCD(a,n);
    if(f==1)
        cout<<"pairwise coprime";
    else if(r==1)
        cout<<"setwise coprime";
    else
        cout<<"not coprime";
}