#include<bits/stdc++.h>
using namespace std;
int check[1000010];
int main(void)
{
	int n;
  	cin >> n;
  	int a[n+5];
  	for(int i=0;i<n;i++)
    {
    	cin >> a[i];
    }
  	for(int i=0;i<1000006;i++)
    {
      check[i] = 0;
    }
  	int ts;
  	int pairwise = 1;
  	int setwise = 1;
  	for(int i=0;i<n;i++)
    {
		ts = a[i];
      if(a[i]%2==0)
      {
        if(check[i]!=0)
        {
          pairwise = 0;
        }
        check[i]++;
      	while(ts%2==0)
        {
        	ts = ts/2;
        }
      }
      for(int j=3;j*j<=a[i];j+=2)
      {
        if(ts%j==0)
        {
          if(check[j]!=0)
          {
            pairwise = 0;
          }
          check[j]++;
          while(ts%j==0)
          {
              ts = ts/j;
          }
        }
      }
      if(ts>1)
      {
        if(check[ts]!=0)
        {
          paiwise = 0;
        }
        check[ts]++;
      }
    }
  	if(check[2]==n)
    {
      setwise = 0;
    }
  	for(int i=3;i<=1000006;i++)
    {
    	if(check[i]==n)
        {
          setwise = 0;
        }
    }
  if(pairwise==1)
  {
    
    cout << "pairwise coprime" << endl;
  }
  else
  {
    if(setwise==1)
    {
      cout << "setwise coprime" << endl;
    }
    else
    {
      cout << "not coprime" << endl;
    }
  }
}
