#include <iostream>
#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL)
#define ll long long
#define li long ll
#define pp pair<ll, ll>
#define lb lower_bound
#define ub upper_bound
#define mk make_pair
#define pb push_back
#define llp(i, x, n) for (ll i = x; i < n; i++)
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#define fr first
#define ss second
#define mod 1000000007
using namespace std;
int findMaxGCD(int arr[], int n) 
{ 
   
    int high = 0; 
    for (int i = 0; i < n; i++) 
        high = max(high, arr[i]); 
  
   
    int divisors[high + 1] = { 0 }; 
  
  
    for (int i = 0; i < n; i++) 
    {
        for (int j = 1; j <= sqrt(arr[i]); j++) 
        { 
            if (arr[i] % j == 0) 
            { 
               
                divisors[j]++; 
                  if (j != arr[i] / j) 
                    divisors[arr[i] / j]++; 
            } 
        } 
    } 
    for (int i = high; i >= 1; i--) 
        if (divisors[i] > 1) 
            return i;     
} 
int main()
{
	fast;
    int n;
    cin>>n;
    int a[n];
    llp(i,0,n)
    cin>>a[i];
    int m=a[0];
    for(int i=1;i<n;i++)
    {
    	m=__gcd(m,a[i]);
    }
    if(findMaxGCD(a,n)==1)
    cout<<"pairwise coprime"<<endl;
    else if(m==1)
    cout<<"setwise coprime"<<endl;
    else
    cout<<"not coprime"<<endl;
}