#include <bits/stdc++.h>
using namespace std;
long long int findgcd(long long int a, long long int b, long long int *x,
                      long long int *y) {
  if (a == 0) {
    *x = 0, *y = 1;
    return b;
  }
  long long int x1, y1;
  long long int gcd = findgcd(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
long long int modInv(long long int b) {
  long long int x, y;
  long long int g = findgcd(b, 1000000007, &x, &y);
  if (g != 1) return -1;
  return (x % 1000000007 + 1000000007) % 1000000007;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, i, j, s = 0, inv, div, a, prod = 1;
  cin >> n;
  vector<long long int> ar;
  for (i = 0; i < n; i++) {
    cin >> a;
    ar.push_back(a);
  }
  int f = 0;
  long long int result = ar[0];
  for (i = 1; i < n; i++) {
    result = gcd(ar[i], result);
    if (result == 1) break;
  }
  if (result == 1) {
    f = 1;
  } else {
    cout << "not coprime";
    return 0;
  }
  for (i = 0; i < n; i++) {
    prod = (prod * ar[i]) % 1000000007;
  }
  result = ar[0];
  for (i = 1; i < n; i++) {
    div = gcd(result, ar[i]);
    result = ((ar[i] * result)) % 1000000007;
    inv = modInv(div);
    result = (result * inv + 1000000007) % 1000000007;
  }
  if (prod == result) {
    cout << "pairwise coprime";
  } else
    cout << "setwise coprime";
}
