#include <bits/stdc++.h>
#include<math.h>
using namespace std;
#define int long long int
#define pp pair<int,int>
#define endl "\n"
#define PI 3.14159265
int MAXN = 5000001;
const int mod=1000000007;
const int INF =INT_MAX;
inline int gcd(int a,int b){if(a==0) return b;return gcd(b%a,a);}
inline int pow(int a,int n,int mod){if(n==0)return 1;int p=pow(a,n/2,mod);p=(p%mod*p%mod)%mod;if(n%2) return (p%mod*a%mod)%mod;else return p;}
int func(int arr[], int n)
{
    int high = 0;
    for (int i = 0; i < n; i++)
        high = max(high, arr[i]);
    int divisors[high + 1] = { 0 };
    for (int i = 0; i < n; i++)
    {
        for (int j = 1; j <= sqrt(arr[i]); j++)
        {
            if (arr[i] % j == 0)
            {
                divisors[j]++;
                if (j != arr[i] / j)
                    divisors[arr[i] / j]++;
            }
        }
    }
    for (int i = high; i >= 1; i--)
        if (divisors[i] > 1)
            return i;
}
int func1(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;
}
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t=1;
    //cin>>t;
    while(t--)
    {
      int n;
      cin>>n;
      int v[n];
      for(int i=0;i<n;i++)cin>>v[i];
      if(func(v,n)==1)
        cout<<"pairwise coprime"<<endl;
      else if(func1(v,n)==1)cout<<"setwise coprime"<<endl;
        else cout<<"not coprime"<<endl;
    }
    return 0;
}
