#include <bits/stdc++.h>
using namespace std;

int i,j,n,w,k;
int getMaxGCD(int arr[], int n) {
   int high = 0;
   for (int i = 0; i < n; i++)
   high = max(high, arr[i]);
   int divisors[high + 1] = { 0 }; //array to store all gcd values
   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 F(int arr[],int n)
{
  k=__gcd(arr[0],arr[n-1]);
  for(i=0;i<n;i++)
  {
    k=__gcd(k,arr[i]);
  }
  return k;
}
int main()
{

  cin>>n;
  int arr[i];
  for(i=0;i<n;i++)
  cin>>arr[i];
  w=getMaxGCD(arr,n);
  k=F(arr,n);
  //cout<<w<<endl;
  //cout<<k<<endl;
  if (w==1)cout<<"pairwise coprime"<<endl;
  else if(k==1)cout<<"setwise coprime"<<endl;
  else  cout<<"not coprime"<<endl;



    return 0;
}
