#include <bits/stdc++.h>
using namespace std;
void customrun() {}
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
bool isprime(long long n) {
  if (n == 1) return false;
  for (long long i = 2; (long long)i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
long long fib(int n) {
  long long a = 0, b = 1, c, i;
  if (n == 0) return a;
  for (i = 2; i <= n; i++) {
    c = (a + b);
    a = b;
    b = c;
  }
  return b;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long extendedgcd(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long x1, y1;
  long long d = extendedgcd(b, a % b, x1, y1);
  x = y1;
  y = x1 - y1 * (a / b);
  return d;
}
long long findgrouplcm(vector<int> &arr, int n) {
  long long ans = arr[0];
  for (long long i = 1; i < n; i++) ans = (arr[i] * (ans / (gcd(arr[i], ans))));
  return ans;
}
long long powerwithmod(long long x, unsigned long long y, long long p) {
  long long res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
bool comp(const pair<long, long> &a, const pair<long, long> &b) {
  if (a.first == b.first) return a.second < b.second;
  return a.first < b.first;
}
void solve();
int main() {
  clock_t begin = clock();
  fast();
  customrun();
  long long t = 1;
  for (long long i = (1); i < (t + 1); i += (1)) {
    solve();
  }
  clock_t end = clock();
  double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
  return 0;
}
int p[1000005];
map<int, int> m;
void solve() {
  int n;
  cin >> (n);
  int arr[n];
  unordered_multiset<int> s;
  for (long long i = 0; i < n; i++) {
    cin >> (arr[i]);
    if (s.find(arr[i]) != s.end() and arr[i] != 1) {
      cout << ("not coprime");
      return;
    } else
      s.insert(arr[i]);
  }
  p[0] = p[1] = 1;
  for (int i = 2; i <= 1000000; i++) {
    if (p[i] == 0) {
      for (int j = i; j <= 1000000; j += i) {
        p[j] = 1;
        if (s.find(j) != s.end()) m[i]++;
      }
    }
  }
  bool ok = true;
  for (auto i = (m).begin(); i != (m).end(); i++) {
    if (i->second >= n) {
      cout << ("not coprime");
      return;
    }
    if (i->second >= 2) {
      ok = false;
    }
  }
  if (!ok) {
    cout << ("setwise coprime");
  } else
    cout << ("pairwise coprime");
}
