#include<bits/stdc++.h>
using namespace std;
#define ll long long int 
  
// Function to calculate GCD 
ll GCD(ll a, ll b) 
{ 
    if (a == 0) 
        return b; 
    return GCD(b % a, a); 
} 
  
// Function to calculate LCM 
ll LCM(ll a, ll b) 
{ 
    return (a * b) 
           / GCD(a, b); 
} 
  
// Function to check if all elements 
// in the array are pairwise coprime 
int checkPairwiseCoPrime(int A[], int n) 
{ 
    // Initialze variables 
    ll prod = 1; 
    ll lcm = 1; 
  
    // Itertae over the array 
    for (int i = 0; i < n; i++) { 
  
        // Calculate product of 
        // array elements 
        prod *= A[i]; 
  
        // Calculate LCM of 
        // array elements 
        lcm = LCM(A[i], lcm); 
    } 
  
    // If the product of array elements 
    // is equal to LCM of the array 
    if (prod == lcm) 
        return 1; 
    else
        return 0;
    
} 
  
// Function to find gcd of array of 
// numbers 
int findGCD(int arr[], int n) 
{ 
    int result = arr[0]; 
    for (int i = 1; i < n; i++) 
    { 
        result = __gcd(arr[i], result); 
  
        if(result == 1) 
        { 
           return 1; 
        } 
    } 
    return result; 
} 
int main()
{
    int n;
   cin>>n;
    int a[n];
   for(int i=0;i<n;i++)
    cin>>a[i];
   if(checkPairwiseCoPrime(a,n)==1)
        cout<<"pairwise coprime\n";
    else if(findGCD(a,n)==1)
        cout<<"setwise coprime\n";
    else
        cout<<"not coprime\n";
    
}