//   ┏━━┓┏━━┓┏┓┏┓┏┳━┳┓┏━━┓┏━┳┓┏━━┓     ┏┳┓┏┳┓┏━┳━┓┏━━┓┏━┓
//   ┃┏┓┃┃━━┫┃┗┛┃┃┃┃┃┃┃┏┓┃┃┃┃┃┗┃┃┛     ┃┏┛┃┃┃┃┃┃┃┃┃┏┓┃┃╋┃
//   ┃┣┫┃┣━━┃┃┏┓┃┃┃┃┃┃┃┣┫┃┃┃┃┃┏┃┃┓     ┃┗┓┃┃┃┃┃┃┃┃┃┣┫┃┃┓┫
//   ┗┛┗┛┗━━┛┗┛┗┛┗━┻━┛┗┛┗┛┗┻━┛┗━━┛     ┗┻┛┗━┛┗┻━┻┛┗┛┗┛┗┻┛
#include "bits/stdc++.h" 
using namespace std; 
#define mod 1e9 + 7 
#define FOR(a, c)  for(int a = 0; a < c; a++) 
#define FORL(a, b, c) for(int a = b; a < c; a++) 
#define FORR(a, b, c) for(int a = b ; a > c; a--) 
typedef long long int ll; 
typedef vector<int> vi; 
typedef pair<int, int> pi; 
#define PB push_back 
#define POB pop_back 
#define MP make_pair 

int main() 
{ 
  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  int n;
  cin>>n;
  int a[n];
  FOR(i,n){
    cin>>a[i];
    //;
  }
  int count=0;
  for(int i=0; i<n-1; i++){
    if(__gcd(a[i], a[i+1])==1){
      count++;
    }
  }
  if(count==n-1){
    cout<< "pairwise coprime";
    return 0;
  }
  int gcd=a[0];
  FOR(i,n){
    gcd = __gcd(gcd,a[i]);
  }
  if(gcd==1){
    cout<< "setwise coprime";
    return 0;
  }
  else{
    cout<< "not coprime";
  }
  return 0;
}
// By Ashwani Kumar, Indian Institute Of Technology(IIT), Guwahati.
//   ╔══╗╔══╗╔══╗     ╔══╗╔╦╗╔╦═╦╗╔══╗╔╗╔╗╔══╗╔══╗╔══╗
//   ╚║║╝╚║║╝╚╗╔╝     ║╔═╣║║║║║║║║║╔╗║║╚╝║║╔╗║╚╗╔╝╚║║╝
//   ╔║║╗╔║║╗─║║─     ║╚╗║║║║║║║║║║╠╣║║╔╗║║╠╣║─║║─╔║║╗
//   ╚══╝╚══╝─╚╝─     ╚══╝╚═╝╚═╩═╝╚╝╚╝╚╝╚╝╚╝╚╝─╚╝─╚══╝