#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <iterator>
#include <math.h>
#include <bits/stdc++.h>
#define ll long long int
#define ull unsigned long long int
#define pb push_back
#define dd double
#define mp make_pair
#include <algorithm>
#include <cmath>
using namespace std;
int main()
{
    // ios_base::sync_with_stdio(false);
    // cin.tie(NULL);
    // int T,p;
    // cin>>T;
    // for(p=1;p<=T;p++)
    // {
     ll N;
     cin>>N;
     ll A[N],i,j,k,a,b,c;
     set <ll> check;
     bool x=true,y=true;
      for(j=0;j<N;j++)
      {
      cin>>A[j];
      a=A[j];
      set <ll> check1;
      if(x)
      {
        for(i=2;i*i<=a;i++)
        {
            if(a%i==0)
             {
              if(check.find(i)!=check.end())
              x=false;
              check1.insert(i);
             }
        }
      }
      if(x)
      {
        auto x=check1.begin();
        while(x!=check1.end())
        {
          check.insert(*x);
          x++;
        }
      }
      // if(j==1)
      // cout<<check.size()<<"\n";
      if(j==0)
      c=A[j];
      if(j>=1)
      {
      b=__gcd(A[j],c);
      c=b;
      }
      // cout<<j<<" "<<c<<"\n";
    }
    if(x)
    cout<<"pairwise coprime";
    else if(c==1)
    cout<<"setwise coprime";
    else
    cout<<"not coprime";
  return 0;
}