#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define fo(i,n) for(int i=0;i<n;i++)
#define ll long long
#define db1(x) cout << #x << "=" << x << endl
#define db2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cout << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define deb1a(v)                  \
    cout << #v << "--->" << endl; \
    for (auto it : v)             \
        cout << it << " ";        \
    cout << endl;

#define deb2a(v)                  \
    cout << #v << "--->" << endl; \
    for (auto it : v)             \
    {                             \
        for (auto it1 : it)       \
        {                         \
            cout << it1 << " ";   \
        }                         \
        cout << endl;             \
    }
#define deb3a(v)                               \
    cout << #v << "-->" << endl;               \
    for (auto it : v)                          \
    {                                          \
        cout << it.fi << " " << it.se << endl; \
    }




#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define fo(i,n) for(int i=0;i<n;i++)
#define ll long long
#define db1(x) cout << #x << "=" << x << endl
#define db2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cout << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define deb1a(v)                  \
    cout << #v << "--->" << endl; \
    for (auto it : v)             \
        cout << it << " ";        \
    cout << endl;

#define deb2a(v)                  \
    cout << #v << "--->" << endl; \
    for (auto it : v)             \
    {                             \
        for (auto it1 : it)       \
        {                         \
            cout << it1 << " ";   \
        }                         \
        cout << endl;             \
    }
#define deb3a(v)                               \
    cout << #v << "-->" << endl;               \
    for (auto it : v)                          \
    {                                          \
        cout << it.fi << " " << it.se << endl; \
    }





    bool coprime(int a, int b) 
{    
    return (__gcd(a, b) == 1); 
} 
 int findGCD(int arr[], int n) 
{ 
    int result = arr[0]; 
    bool sonel =false;
    for (int i = 1; i < n; i++) 
    { 
        result = __gcd(arr[i], result); 
  
    } 
  
 
   
    if(result ==1)
    {
      sonel =true;
    }
    if (sonel)
    {
       cout<<"setwise coprime";
     
    }
    else
    {
          cout<<"not coprime";
    }
    

}  


void numOfPairs(int arr[], int n) 
{  
      
    bool count = false;  
    for (int i = 0; i < n - 1; i++)  
        for (int j = i + 1; j < n; j++) 
            if (coprime(arr[i], arr[j])) 
                count=true;


    if(count)

    {
        cout<<"pairwise coprime";
       
    }
 
    else
    {
         findGCD(arr,n);
         //cout<<"not coprime";
    }
    
    
} 
int main()
{
    int n;
    cin>>n;
    int a[100000];
    for(int i=0;i<n;i++)
    {
    cin>>a[i];
    }
    numOfPairs(a,n);
  
  
}

