#include <bits/stdc++.h>
using namespace std;

int main() {
  int N, A;
  cin >> N;
  string ans = "APPROVED";
  while (cin >> A) if (!(A % 2) && A % 3 && A % 5) ans = "DENIED";
  cout << ans << "\n";
}