/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <bits/stdc++.h>

using namespace std;

int main()
{ int n; cin>>n; int a[n];bool f = 0;int res;
vector<int> v(n,0);
for(int i =0;i<n;i++)
cin>>a[i];
for(int i =0;i<n-1;i++)
for(int j =i+1;j<n;j++)
if(__gcd(a[i],a[j])==1)
 v[i] = 1;
for(int i =0;i<n;i++)
if(v[i]==0)
f =1;
if(f==0)
cout<<"pairwise coprime";
else{

if (f==1){
    res = a[0];
    for(int j =1;j<n;j++)
     res = __gcd(res,a[j]);
}}
   if(res==1)
   cout<<"setwise coprime";
else 
cout<<"not coprime";

    return 0;
}
