#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int> >;
inline int next_combination(int sub) {
  int x = sub & -sub, y = sub + x;
  return (((sub & ~y) / x) >> 1) | y;
}
void uniq(vector<int>& vec) {
  sort(vec.begin(), vec.end());
  vec.erase(unique(vec.begin(), vec.end()), vec.end());
  return;
}
int N;
int bit[1000010];
void add(int a, int w) {
  for (int x = a; x <= N; x += x & -x) bit[x] += w;
}
int sum(int a) {
  int ret = 0;
  for (int x = a; x > 0; x -= x & -x) ret += bit[x];
  return ret;
}
const long long INF = 1LL << 60;
long long dp[100010];
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
void calc_sosuu(vector<long long>& sosuu) {
  for (int i = 3; i < 1000; ++i) {
    bool hoge = true;
    for (auto itr = sosuu.begin(); itr != sosuu.end(); ++itr) {
      if (i % *itr == 0) {
        hoge = false;
        break;
      }
      if (i < (*itr) * (*itr)) break;
    }
    if (hoge) {
      sosuu.push_back(i);
    }
  }
  return;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
vector<long long> get_yakusuu(const vector<long long>& sosuu, long long n) {
  vector<long long> ans;
  for (auto itr = sosuu.begin(); itr != sosuu.end(); ++itr) {
    if (n < (*itr) * (*itr)) break;
    if (n % (*itr) == 0) ans.push_back(*itr);
  }
  ans.push_back(n);
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  vector<long long> sosuu = {2};
  calc_sosuu(sosuu);
  int n;
  cin >> n;
  string ans = "not coprime\n";
  vector<long long> a(n);
  vector<long long> b;
  for (int i = 0; i < n; ++i) cin >> a[i];
  bool is_pairwise = true;
  for (int bit = (1 << 2) - 1; bit < (1 << n); bit = next_combination(bit)) {
    vector<long long> temp;
    for (int i = 0; i < n; ++i) {
      if (bit & 1 << i) {
        temp.push_back(a[i]);
      }
    }
    long long g = gcd(temp[0], temp[1]);
    b.push_back(g);
    if (g != 1) is_pairwise = false;
  }
  if (is_pairwise) {
    cout << "pairwise coprime\n";
    return 0;
  }
  bool is_setwise = false;
  sort(b.begin(), b.end());
  if (b.front() == 1) is_pairwise = true;
  vector<long long> hb = get_yakusuu(sosuu, b.front());
  for (auto itr = hb.begin(); itr != hb.end(); ++itr) {
    for (unsigned int i = 0; i < b.size() - 1; i++) {
      if (b[i + 1] % (*itr) != 0) {
        is_setwise = true;
        break;
      }
    }
  }
  if (is_setwise) {
    cout << "setwise coprime\n";
  } else {
    cout << ans;
  }
  return 0;
}
