#include <bits/stdc++.h>
using namespace std;
const char en = '\n';
constexpr long long INF = 1000000000;
constexpr long long MOD = 1000000007;
void add_edge(vector<vector<int>>& g, int from, int to, bool isDirected) {
  g[from].push_back(to);
  if (!isDirected) g[to].push_back(from);
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  } else
    return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  } else
    return false;
}
struct ModInt {
  ModInt() : mInt(-1){};
  ModInt(long long n) : mInt(n){};
  long long mInt;
  static vector<ModInt> mFact;
  static long long mMod;
  ModInt& operator=(const ModInt& a) {
    mInt = a.mInt;
    mInt %= mMod;
    return *this;
  }
  ModInt& operator+=(const ModInt& a) {
    mInt += a.mInt;
    mInt %= mMod;
    return *this;
  }
  ModInt& operator-=(const ModInt& a) {
    mInt -= a.mInt;
    if (mInt < 0) mInt += mMod;
    return *this;
  }
  ModInt& operator*=(const ModInt& a) {
    mInt *= a.mInt;
    mInt %= mMod;
    return *this;
  }
  ModInt operator+(const ModInt a) { return ModInt(mInt + a.mInt % mMod); }
  ModInt operator-(const ModInt a) {
    return ModInt(mInt - a.mInt < 0 ? mInt - a.mInt + mMod : mInt - a.mInt);
  }
  ModInt operator*(const ModInt a) { return ModInt(mInt * a.mInt % mMod); }
  ModInt& operator=(const long long& a) {
    mInt = a;
    return *this;
  }
  ModInt& operator+=(const long long& a) {
    mInt += a;
    mInt %= mMod;
    return *this;
  }
  ModInt& operator-=(const long long& a) {
    mInt -= a;
    if (mInt < 0) mInt += mMod;
    return *this;
  }
  ModInt& operator*=(const long long& a) {
    mInt *= a;
    mInt %= mMod;
    return *this;
  }
  ModInt operator+(const long long a) { return ModInt((mInt + a) % mMod); }
  ModInt operator-(const long long a) {
    return ModInt(mInt - a < 0 ? mInt - a + mMod : mInt - a);
  }
  ModInt operator*(const long long a) { return ModInt((mInt * a) % mMod); }
  ModInt operator++() { return ModInt((++mInt) % mMod); }
  ModInt operator--() {
    if (mInt == 0)
      return mInt = mMod - 1;
    else
      --mInt;
  }
  bool operator==(ModInt a) { return mInt == a.mInt; }
  bool operator!=(ModInt a) { return mInt != a.mInt; }
  friend ostream& operator<<(ostream& os, const ModInt& n) {
    return os << n.mInt;
  }
  friend istream& operator>>(istream& is, ModInt& n) {
    istream& ret = is >> n.mInt;
    n.mInt %= MOD;
    return ret;
  }
};
long long ModInt::mMod = MOD;
vector<ModInt> ModInt::mFact(1, 1);
void setFact(long long n) {
  ModInt::mFact[0] = 1;
  for (int i = 1; i <= (n); ++i) ModInt::mFact[i] *= ModInt::mFact[i - 1];
}
void setMod(long long mod) { ModInt::mMod = mod; }
ModInt mod_pow(ModInt a, long long b) {
  ModInt ret = 1;
  while (b > 0) {
    if (b & 1) ret *= a;
    a *= a;
    b >>= 1;
  }
  return ret;
}
ModInt mod_pow(long long a, long long b) { return mod_pow(ModInt(a), b); }
ModInt inv(ModInt n) { return mod_pow(n, n.mMod - 2); }
ModInt fact(ModInt n) {
  long long s = ModInt::mFact.size();
  if (s - 1 >= n.mInt) return ModInt::mFact[n.mInt];
  ModInt fac = ModInt::mFact[s - 1];
  for (int i = s; i <= n.mInt; ++i) {
    fac *= i;
    ModInt::mFact.push_back(fac);
  }
  return fac;
}
ModInt comb(long long n, long long r) {
  ModInt com = 1;
  if (n / 2 < r)
    return comb(n, n - r);
  else {
    for (int i = 0; i < r; ++i) com *= n - i;
    return com * inv(fact(r));
  }
}
void setComb(vector<ModInt>& combs, long long n, long long r) {
  ModInt comb = 1;
  combs[0] = combs[n] = comb;
  if (n / 2 < r)
    setComb(combs, n, n - r);
  else {
    for (long long i = 1; i <= r; ++i) {
      comb *= inv(i) * (n - i + 1);
      combs[i] = combs[n - i] = comb;
    }
  }
}
void setComb(vector<ModInt>& combs, long long n) {
  if (combs.size() < n + 1)
    cerr << "setComb : need n+1 size" << endl;
  else
    setComb(combs, n, (n + 1) / 2);
}
void setCombAll(vector<vector<ModInt>>& combs, long long n) {
  if (combs.size() < n - 1)
    cerr << "setCombAll : n" << n << " is small" << endl;
  for (int i = 0; i < (n + 1); ++i)
    for (int j = 0; j < (i + 1); ++j) {
      if (j == 0 || j == i)
        combs[i][j] = 1;
      else
        combs[i][j] = combs[i - 1][j - 1] + combs[i - 1][j];
    }
}
map<long long, int> primeFactor(long long n) {
  map<long long, int> ret;
  while (n % 2 == 0) {
    n /= 2;
    ret[2]++;
  }
  int i = 3;
  while (n > 1 && (long long)i * i <= n) {
    while (n % i == 0) {
      n /= i;
      ret[i]++;
    }
    i += 2;
  }
  if (n != 1) ret.insert({n, 1});
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n;
  cin >> n;
  vector<map<long long, int>> a(n);
  for (int i = 0; i < (n); ++i) {
    long long _a;
    cin >> _a;
    a[i] = primeFactor(_a);
  }
  map<long long, int> pro;
  bool p = true;
  for (int i = 0; i < (n); ++i) {
    for (auto pe : a[i]) {
      if (pro[pe.first] > 0) {
        p = false;
        break;
      }
      pro[pe.first] += pe.second;
    }
    if (!p) break;
  }
  if (p) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  map<long long, int> g = a[0];
  for (int i = 0; i < (n); ++i) {
    for (auto pe : a[i]) {
      g[pe.first] = min(pe.second, g[pe.first]);
    }
    for (auto& pe : g) {
      pe.second = min(pe.second, a[i][pe.first]);
    }
  }
  for (auto pe : g) {
    if (pe.second > 0) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
}
