#include <bits/stdc++.h> 
#define ll long long 
using namespace std; 
  
#define MAXN 1000001 
int spf[MAXN]; 
int hash1[MAXN] = { 0 }; 

void sieve() 
{ 
    spf[1] = 1; 
    for (int i = 2; i < MAXN; i++) 
        spf[i] = i; 
  
    for (int i = 4; i < MAXN; i += 2) 
        spf[i] = 2; 
    for (int i = 3; i * i < MAXN; i++) { 
        if (spf[i] == i) { 
            for (int j = i * i; j < MAXN; j += i) 
                if (spf[j] == j) 
                    spf[j] = i; 
        } 
    } 
} 

void getFactorization(ll int x) 
{ 
    int temp; 
    while (x != 1) { 
        temp = spf[x]; 
        if (x % temp == 0) { 
  
            hash1[spf[x]]++; 
            x = x / spf[x]; 
        } 
        while (x % temp == 0) 
            x = x / temp; 
    } 
} 
  
bool check(ll int x) 
{ 
    int temp; 
    while (x != 1) { 
        temp = spf[x]; 
  
        if (x % temp == 0 && hash1[temp] > 1) 
            return false; 
        while (x % temp == 0) 
            x = x / temp; 
    } 
    return true; 
} 
  
bool hasValidNum(ll int arr[], int n) 
{ 
  
    sieve(); 
  
    for (int i = 0; i < n; i++) 
        getFactorization(arr[i]); 
  
    for (int i = 0; i < n; i++) 
        if (check(arr[i])) 
            return true; 
  
    return false; 
} 
  
int main() 
{ 
    int n;
    cin>>n;
    ll int a[n],x;
    for(int i=0;i<n;i++){
         cin>>a[i];
        if(i==0){x=a[0];}
        x=__gcd(x,a[i]);
    }
    if (hasValidNum(a, n)) 
        cout << "pairwise coprime\n"; 
    else{
        if(x==1)
            cout << "setwise coprime\n"; 
        else
        cout << "not coprime\n"; 
    }
    return 0; 
} 