#include <bits/stdc++.h>
using namespace std;
inline long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
bool have[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]);
  if (GGCCDD > 1)
    puts("not coprime");
  else {
    bool pcop = true;
    long long not1 = 0;
    for (long long i = 0; i < N; i++)
      if (x[i] == 1) not1++;
    if (not1 >= 90000) {
      puts("setwise coprime");
      return 0;
    }
    memset(have, false, sizeof(have));
    for (long long i = N - 1; i >= 0; i--) {
      long long tmp = x[i];
      for (long long j = 2; j <= sqrt(x[i]); j++)
        if (tmp % j == 0) {
          if (have[j]) {
            pcop = false;
            break;
          }
          have[j] = true;
          while (tmp % j == 0) tmp /= j;
        }
      if (tmp > 1) {
        if (have[tmp]) {
          pcop = false;
          break;
        }
        have[tmp] = true;
      }
    }
    if (pcop)
      puts("pairwise coprime");
    else
      puts("setwise coprime");
  }
  return 0;
}
