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

using namespace std;

int arr[1000007] ;

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