#include <iostream>
#include<bits/stdc++.h>

using namespace std;

int arr[1000007] ;

int main()
{
    int n  ,  pairwise = 1 , i , j, g , f;
    scanf ("%d",&n) ;
    for (i=0 ; i<n ; i++ )
    {
                 scanf("%d",&arr[i]) ;
    }
    f = __gcd ( arr[0] , arr[1] );
    for ( i=0  ; i<n ;i++ )
    {
                 for (j=i+1 ; j<n ; j++)
                 {
                            g = __gcd (arr[j],arr[i]);
                            if ( g>1 )
                            {
                                 pairwise = 0 ;
                            }
                 }
                 f = __gcd(f,arr[i]);
    }
    if ( pairwise )
    {
                 printf("pairwise coprime") ;
    }
    else if ( f == 1 )
    {
                 printf("setwise coprime");
    }
    else
    {
                 printf("not coprime") ;
    }
    return 0;
}
