import java.util.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];
    int[] b = new int[n];
    int m=0;
    for(int i = 0;i<n;i++){
      a[i] = sc.nextInt();
      if(a[i]%2==0){
        b[m] = a[i];
        m++;
      }
    }
    if(approved(b)){
      System.out.println("APPROVED");
    }else{
      System.out.println("DENIED");
    }
  }
  static boolean approved(int[] n){
    for(int i = 0;i<n.length;i++){
      if(n[i]%3!=0&&n[i]%5!=0){
        return false;
      }
    }
    return true;
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];
    int[] b = new int[n];
    int m=0;
    for(int i = 0;i<n;i++){
      a[i] = sc.nextInt();
      if(a[i]%2==0){
        b[m] = a[i];
        m++;
      }
    }
    if(approved(b)){
      System.out.println("APPROVED");
    }else{
      System.out.println("DENIED");
    }
  }
  static boolean approved(int[] n){
    for(int i = 0;i<n.length;i++){
      if(n[i]%3!=0&&n[i]%5!=0){
        return false;
      }
    }
    return true;
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];
    int[] b = new int[n];
    int m=0;
    for(int i = 0;i<n;i++){
      a[i] = sc.nextInt();
      if(a[i]%2==0){
        b[m] = a[i];
        m++;
      }
    }
    if(approved(b)){
      System.out.println("APPROVED");
    }else{
      System.out.println("DENIED");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];
    int[] b = new int[n];
    int m=0;
    for(int i = 0;i<n;i++){
      a[i] = sc.nextInt();
      if(a[i]%2==0){
        b[m] = a[i];
        m++;
      }
    }
    if(approved(b)){
      System.out.println("APPROVED");
    }else{
      System.out.println("DENIED");
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a = new int[n]; a new int[n] n int[] b = new int[n]; b new int[n] n int m=0; m 0 for(int i = 0;i<n;i++){
      a[i] = sc.nextInt();
      if(a[i]%2==0){
        b[m] = a[i];
        m++;
      }
    } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
      a[i] = sc.nextInt();
      if(a[i]%2==0){
        b[m] = a[i];
        m++;
      }
    } {
      a[i] = sc.nextInt();
      if(a[i]%2==0){
        b[m] = a[i];
        m++;
      }
    } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc if(a[i]%2==0){
        b[m] = a[i];
        m++;
      } a[i]%2==0 a[i]%2 a[i] a i 2 0 {
        b[m] = a[i];
        m++;
      } b[m] = a[i] b[m] b m a[i] a i m++ m if(approved(b)){
      System.out.println("APPROVED");
    }else{
      System.out.println("DENIED");
    } approved(b) approved b {
      System.out.println("APPROVED");
    } System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" {
      System.out.println("DENIED");
    } System.out.println("DENIED") System.out.println System.out System System.out "DENIED" String[] args args static boolean approved(int[] n){
    for(int i = 0;i<n.length;i++){
      if(n[i]%3!=0&&n[i]%5!=0){
        return false;
      }
    }
    return true;
  } approved {
    for(int i = 0;i<n.length;i++){
      if(n[i]%3!=0&&n[i]%5!=0){
        return false;
      }
    }
    return true;
  } for(int i = 0;i<n.length;i++){
      if(n[i]%3!=0&&n[i]%5!=0){
        return false;
      }
    } int i = 0; int i = 0; i 0 i<n.length i n.length n n.length i++ i++ i {
      if(n[i]%3!=0&&n[i]%5!=0){
        return false;
      }
    } {
      if(n[i]%3!=0&&n[i]%5!=0){
        return false;
      }
    } if(n[i]%3!=0&&n[i]%5!=0){
        return false;
      } n[i]%3!=0&&n[i]%5!=0 n[i]%3!=0 n[i]%3 n[i] n i 3 0 n[i]%5!=0 n[i]%5 n[i] n i 5 0 {
        return false;
      } return false; false return true; true int[] n n public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];
    int[] b = new int[n];
    int m=0;
    for(int i = 0;i<n;i++){
      a[i] = sc.nextInt();
      if(a[i]%2==0){
        b[m] = a[i];
        m++;
      }
    }
    if(approved(b)){
      System.out.println("APPROVED");
    }else{
      System.out.println("DENIED");
    }
  }
  static boolean approved(int[] n){
    for(int i = 0;i<n.length;i++){
      if(n[i]%3!=0&&n[i]%5!=0){
        return false;
      }
    }
    return true;
  }
} public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];
    int[] b = new int[n];
    int m=0;
    for(int i = 0;i<n;i++){
      a[i] = sc.nextInt();
      if(a[i]%2==0){
        b[m] = a[i];
        m++;
      }
    }
    if(approved(b)){
      System.out.println("APPROVED");
    }else{
      System.out.println("DENIED");
    }
  }
  static boolean approved(int[] n){
    for(int i = 0;i<n.length;i++){
      if(n[i]%3!=0&&n[i]%5!=0){
        return false;
      }
    }
    return true;
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];
    int[] b = new int[n];
    int m=0;
    for(int i = 0;i<n;i++){
      a[i] = sc.nextInt();
      if(a[i]%2==0){
        b[m] = a[i];
        m++;
      }
    }
    if(approved(b)){
      System.out.println("APPROVED");
    }else{
      System.out.println("DENIED");
    }
  }
  static boolean approved(int[] n){
    for(int i = 0;i<n.length;i++){
      if(n[i]%3!=0&&n[i]%5!=0){
        return false;
      }
    }
    return true;
  }
}
