#include <bits/stdc++.h>
using namespace std;
const int N = 1e6, M = 1e9 + 7;
int n, a[N], g;
long long l = 1, product = 1;
bool vis[N + 1], distinct = true;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(int a, int b) {
  long long ret = (long long)(a % M) * (b % M) / gcd(a, b);
  ret %= M;
  return ret;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
    if (!vis[a[i]])
      vis[a[i]] = 1;
    else
      distinct = false;
    product *= a[i];
    product %= M;
  }
  for (int i = 0; i < n; ++i) g = gcd(g, a[i]);
  if (g != 1) return puts("not coprime"), 0;
  for (int i = 0; i < n; ++i) l = lcm(l, a[i]);
  if (l == product && distinct)
    puts("pairwise coprime");
  else
    puts("setwise coprime");
}
