
// Problem : E - Coprime
// Contest : AtCoder - AtCoder Beginner Contest 177
// URL : https://atcoder.jp/contests/abc177/tasks/abc177_e
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
#define ll long long
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL)
#define fr(i,a,b) for(int i=a;i<b;i++)
#define frr(i,a,b) for(int i=a;i>=b;i--)
//vector
#define pb push_back
#define vi vector<int>
#define vl vector<ll>
#define pp pop_back
//pair
#define pi pair<int ,int >
#define mk make_pair
#define ff first
#define ss second
//set
#define si set<int>
#define sit set<int>::iterator 
using namespace std;
#include <bits/stdc++.h> 
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 count[high + 1] = {0}; 
    for (int i = 0; i < n; i++) 
        count[arr[i]]++; 
    int counter = 0; 

    for (int i = high; i >= 1; i--) 
    { 
        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 main() 
{ 

fast;
    int n;cin>>n;
    int a[n],tt=0;
    fr(i,0,n)
    {
    	cin>>a[i];
    	if(i==0)
    	{
    		tt=a[i];
    	}
    	else
    	{
    		tt=__gcd(a[i],tt);
    	}
    }
    int t= findMaxGCD(a, n); 
    if(tt==1) cout<<"setwise coprime";
    else if(t==1) cout<<"pairwise coprime";
    else cout<<"not coprime";
    
  
    return 0; 
} 