#include <bits/stdc++.h>
using namespace std;
inline long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
inline long long LCM(long long a, long long b) { return a * b / GCD(a, b); }
long long sGCD[1000100];
long long x[1000100];
signed main() {
  long long N;
  cin >> N;
  for (long long i = 0; i < N; i++) cin >> x[i];
  long long GGCCDD = x[0];
  for (long long i = 0; i < N; i++) GGCCDD = GCD(GGCCDD, x[i]);
  sGCD[N] = x[N - 1];
  for (long long i = N - 1; i >= 0; i--) sGCD[i] = LCM(sGCD[i + 1], x[i]);
  if (GGCCDD > 1)
    puts("not coprime");
  else {
    bool pcop = true;
    for (long long i = 0; i < N - 1; i++)
      if (GCD(x[i], sGCD[i + 1]) > 1) pcop = false;
    if (pcop)
      puts("pairwise coprime");
    else
      puts("setwise coprime");
  }
  return 0;
}
