#include<bits/stdc++.h>
using namespace std;
#define fastio() ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ll long long int
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define inf 1e9
#define pi 3.1415926536
#define mod 1000000007
#define fr(i,a,b,in) for(int i=a;i<b;i+=in)
#define frn(i,a,b,dc) for(int i=a;i>=b;i-=dc)
#define test(t) int t; cin>>t; while(t--)

int findMaxGCD(int arr[], int n) 
{ 
    // Computing highest element 
    int high = 0; 
    for (int i = 0; i < n; i++) 
        high = max(high, arr[i]); 
  
    // Array to store the count of divisors 
    // i.e. Potential GCDs 
    int divisors[high + 1] = { 0 }; 
  
    // Iterating over every element 
    for (int i = 0; i < n; i++) 
    { 
        // Calculating all the divisors 
        for (int j = 1; j <= sqrt(arr[i]); j++) 
        { 
            // Divisor found 
            if (arr[i] % j == 0) 
            { 
                // Incrementing count for divisor 
                divisors[j]++; 
  
                // Element/divisor is also a divisor 
                // Checking if both divisors are 
                // not same 
                if (j != arr[i] / j) 
                    divisors[arr[i] / j]++; 
            } 
        } 
    } 
  
    // Checking the highest potential GCD 
    for (int i = high; i >= 1; i--) 
      
        // If this divisor can divide at least 2 
        // numbers, it is a GCD of at least 1 pair 
        if (divisors[i] > 1) 
            return i;     
}

int main()
{
	fastio();
	int n;
	cin>>n;
	int a[n];
	fr(i,0,n,1) cin>>a[i];
	int gcd1=findMaxGCD(a,n);
	int gcd2=__gcd(a[0],a[1]);
	fr(i,2,n,1) gcd2 = __gcd(gcd2,a[i]);
	if(gcd1==1) cout<<"pairwise coprime"<<endl;
	else if(gcd2==1) cout<<"setwise coprime"<<endl;
	else cout<<"not coprime"<<endl;
}