#include<bits/stdc++.h>
          using namespace std;
          #include <ext/pb_ds/assoc_container.hpp>
          #include <ext/pb_ds/tree_policy.hpp>
          using namespace __gnu_pbds;
          #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
          #define ll long long
          #define int long long
          #define ld long double
          #define pb push_back
          #define f(i,a,b) for(int i=a;i<b;i++)
          #define fd(i,a,b) for(int i=a;i>=b;i--)
          #define pf push_front
          #define ppf pop_front
          #define ppb pop_back
          #define fi first
          #define se second
          #define vi vector<int>
          #define pii pair<int,int>
          #define mii map<int,int>
          #define sunn(a,n) f(i,0,n)cin>>a[i];
          #define sunn1(a,n) f(i,1,n+1)cin>>a[i];
          #define bol(a,n) f(i,0,n){cout<<a[i]<<" ";}
          #define ashow(a)  for(auto i:a)cout<<i<<" ";
          #define khtm     cout<<endl;
          #define convert  cout<<fixed<<setprecision(x)
          #define all(s) s.begin(),s.end()
          #define len(a) a.length()
          #define INF 1e18
          #define MAXN 2000009
          #define PMOD 998244353
          const double pi=3.14159265358979323;
          const int mod=1e9+7;

                void btao(int n){
        if(n)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
                      }
      bool isPrime(int n) 
     { 
      // Corner cases 
      if (n <= 1) 
          return false; 
      if (n <= 3) 
          return true; 
    
      // This is checked so that we can skip 
      // middle five numbers in below loop 
      if (n % 2 == 0 || n % 3 == 0) 
          return false; 
    
      for (int i = 5; i * i <= n; i = i + 6) 
          if (n % i == 0 || n % (i + 2) == 0) 
              return false; 
    
      return true; 
       } 
        int spf[MAXN];
        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;
                }
            }
        }
 
        int lcm(int a,int b)
            {
                return a*b/__gcd(a,b);
            }
        int  binpow(int  a,int  b) 
        {
            int res = 1;
            while (b > 0) {
                if (b%2 == 1)
                    res = (res * a)%mod;
                a = (a* a)% mod;
                b >>= 1;
            }
            return res;
        }
        int modinv(int y)
        {
            return binpow(y,mod-2);
        }
         
        int fact[500000+5];
               void precal()
            {
            fact[0]=1;
              for(int i=1;i<500000+5;i++)
              {
                fact[i]=(i*fact[i-1])%mod;
              }
            }
      

           signed main() {

              ios_base::sync_with_stdio(false);
              cin.tie(NULL);  
              cout.tie(0);  
              
              /*freopen("input.txt","r",stdin);
              freopen("output.txt","w",stdout);*/


           // -------------------------------------Code starts here--------------------------------------------------------------------- 
                 
          int t=1;
          // cin>>t;
          while(t--)
          {
            

            int n,m,x,y=0;    
            int k;
            cin>>n;
            int a[n];
            int b[1000001]={0};
            sunn(a,n);
            // sort(a,a+n);
            m=a[0];
            // f(i,1,n)
            // {
            //     if(__gcd(a[i],a[i-1])!=1){y=1;}
            // }
            f(i,0,n)
            {
               k=a[i];
               for(int j=2;j<=sqrt(a[i]);j++)
               {
                if(k%j==0)
                {
                  b[j]++;
                  if(b[j]>1){y=1;break;}
                  while(k%j==0)
                  {
                    k/=j;
                  }
                }
               }
                if(k!=1)
                {
                  b[k]++;
                  if(b[k]>1)
                  {
                    y=1;break;
                  }
                }
                
               
               if(y==1)break;
            }
            m=a[0];
            f(i,1,n)
            {
                m=__gcd(m,a[i]);
            }
            // cout<<m<<" "<<y<<endl;
            if(y==0){cout<<"pairwise coprime"<<endl;}
            else if(m==1){cout<<"setwise coprime"<<endl;}
            else cout<<"not coprime"<<endl;

                 }


        }


Measured memory_bytes: 19324