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

const int maxn = 1000005;

int a[maxn];
int cnt[maxn], mark[maxn];
vector<int> primes;
int sz;

void sieve(){
  mark[1] = 1;
  for(int i = 4; i < maxn; i += 2)mark[i] = 1;
  int root = sqrt(maxn);
  for(int i = 3; i <= root; i += 2){
    if(!mark[i]){ 
      for(int j = i + i; j < maxn; j += i){
        mark[j] = 1;
      }
    }
  }
  primes.push_back(2);
  for(int i = 3; i < maxn; i += 2){
    if(!mark[i]){
      primes.push_back(i);
    }
  }
  sz = primes.size();
}

void fact(int x){
  if(x % 2 == 0){
    cnt[2]++;
    while(x % 2 == 0){
      x /= 2;
    }
  }
  for(int i = 1; i < sz && primes[i] * primes[i] <= x; ++i){
    if(x % primes[i]){
      cnt[primes[i]]++;
      while(x % primes[i] == 0){
        x /= primes[i];
      }
    }
  }
  if(x > 1){
    cnt[x]++;
  }
}

int main(int argc, char const *argv[])
{
  int n;
  scanf("%d", &n);
  int gcd = 0;
  for(int i = 1; i <= n; ++i){
    scanf("%d", &a[i]);
    gcd = __gcd(a[i], gcd);
  }
  if(gcd != 1){
    printf("not coprime\n");
    return 0;
  }
  sieve();
  for(int i = 1; i <= n; ++i){
    fact(a[i]);
  }
  bool bad = 0;
  for(int i = 2; i < maxn; ++i){
    if(cnt[i] > 1){
      bad = 1;
      break;
    }
  }
  if(!bad){
    printf("pairwise coprime\n");
  }else {
    printf("setwise coprime\n");
  }

  return 0;
}