#import <stdio.h>
#import <Foundation/Foundation.h>

int main(int argc, char **argv) {
  int N;
  scanf("%d", &N);
  int i;
  BOOL isValid = YES;
  for (i = 0; i < N; i++) {
   	int A;
    scanf("%d", &A);
    if ((A & 1) == 0 && A % 3 != 0 && A % 5 != 0) {
      isValid = NO;
      break;
    }
  }
  printf("%s", isValid ? "APPROVED" : "DENIED");
  return 0;
}