#include <bits/stdc++.h>
using namespace std;
const int N = 2000010;
int a[N], st[N];
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a * b / gcd(a, b); }
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
  }
  bool F = true, S = true;
  int t = 1, tt = 1, ttt;
  for (int i = a[1]; i <= n; ++i) {
    t = gcd(t, a[i]);
    ttt = gcd(tt, a[i]);
    tt = lcm(tt, a[i]);
    if (t != 1) S = false;
    if (ttt != 1) F = false;
  }
  if (F)
    puts("pairwise coprime");
  else if (S)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
