#include <bits/stdc++.h>
using namespace std;
const long long G = 3;
const long long ff = 2e6 + 1;
const long long inf = 1e9 + 1;
const long long base = 2333;
const long long mod = 1e9 + 7;
long long n, a[ff], b[ff], c[ff], tag, cnt[ff];
long long gcd(long long x, long long y) { return (y == 0 ? x : gcd(y, x % y)); }
signed main() {
  cin >> n;
  for (long long i = 1; i <= n; ++i) cin >> a[i], c[a[i]]++;
  b[n + 1] = a[n];
  for (long long i = n; i >= 1; --i) b[i] = gcd(b[i + 1], a[i]);
  sort(a + 1, a + 1 + n);
  for (long long i = 2; i <= a[n]; ++i) {
    long long s = 0;
    for (long long j = i; j <= a[n]; j = j + i)
      if (c[j]) s++;
    if (s >= 2) tag = 1;
  }
  if (tag == 0)
    cout << "pairwise coprime";
  else if (b[1] == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
