#include <iostream>
using namespace std;

int main(void){
  int n;
  int ans;
  
  cin >> n;
  ans = 1;
  for (int i=0; i<n; i++){
    int t; cin >> t;
    ans &= t%2==1||t%3==0||t%5==0;
  }
  cout << (ans?"APPROVED":"DENIED") << endl;
  return 0;
}