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];
    String A1 = "";
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }

    for (int i = 0; i < N; i++) {
      if (A[i] % 2 == 0) {
        count1++;
        if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        }
      }
    }
      if (count1 == count2) {
        A1 = "APPROVED";
      } else if(count1!= count2) {
        A1 = "DENIED";
      }
      System.out.println(A1);
    }
  } 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];
    String A1 = "";
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }

    for (int i = 0; i < N; i++) {
      if (A[i] % 2 == 0) {
        count1++;
        if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        }
      }
    }
      if (count1 == count2) {
        A1 = "APPROVED";
      } else if(count1!= count2) {
        A1 = "DENIED";
      }
      System.out.println(A1);
    }
  } Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[] A = new int[N];
    String A1 = "";
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }

    for (int i = 0; i < N; i++) {
      if (A[i] % 2 == 0) {
        count1++;
        if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        }
      }
    }
      if (count1 == count2) {
        A1 = "APPROVED";
      } else if(count1!= count2) {
        A1 = "DENIED";
      }
      System.out.println(A1);
    } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[] A = new int[N];
    String A1 = "";
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }

    for (int i = 0; i < N; i++) {
      if (A[i] % 2 == 0) {
        count1++;
        if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        }
      }
    }
      if (count1 == count2) {
        A1 = "APPROVED";
      } else if(count1!= count2) {
        A1 = "DENIED";
      }
      System.out.println(A1);
    } 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 String A1 = ""; A1 "" int count1 = 0; count1 0 int count2 = 0; count2 0 for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      A[i] = sc.nextInt();
    } {
      A[i] = sc.nextInt();
    } A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc for (int i = 0; i < N; i++) {
      if (A[i] % 2 == 0) {
        count1++;
        if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        }
      }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      if (A[i] % 2 == 0) {
        count1++;
        if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        }
      }
    } {
      if (A[i] % 2 == 0) {
        count1++;
        if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        }
      }
    } if (A[i] % 2 == 0) {
        count1++;
        if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        }
      } A[i] % 2 == 0 A[i] % 2 A[i] A i 2 0 {
        count1++;
        if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        }
      } count1++ count1 if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        } A[i] % 3 == 0 || A[i] % 5 == 0 A[i] % 3 == 0 A[i] % 3 A[i] A i 3 0 A[i] % 5 == 0 A[i] % 5 A[i] A i 5 0 {
          count2++;
        } count2++ count2 if (count1 == count2) {
        A1 = "APPROVED";
      } else if(count1!= count2) {
        A1 = "DENIED";
      } count1 == count2 count1 count2 {
        A1 = "APPROVED";
      } A1 = "APPROVED" A1 "APPROVED" if(count1!= count2) {
        A1 = "DENIED";
      } count1!= count2 count1 count2 {
        A1 = "DENIED";
      } A1 = "DENIED" A1 "DENIED" System.out.println(A1) System.out.println System.out System System.out A1 String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[] A = new int[N];
    String A1 = "";
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }

    for (int i = 0; i < N; i++) {
      if (A[i] % 2 == 0) {
        count1++;
        if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        }
      }
    }
      if (count1 == count2) {
        A1 = "APPROVED";
      } else if(count1!= count2) {
        A1 = "DENIED";
      }
      System.out.println(A1);
    }
  } public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[] A = new int[N];
    String A1 = "";
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }

    for (int i = 0; i < N; i++) {
      if (A[i] % 2 == 0) {
        count1++;
        if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        }
      }
    }
      if (count1 == count2) {
        A1 = "APPROVED";
      } else if(count1!= count2) {
        A1 = "DENIED";
      }
      System.out.println(A1);
    }
  } 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];
    String A1 = "";
    int count1 = 0;
    int count2 = 0;

    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }

    for (int i = 0; i < N; i++) {
      if (A[i] % 2 == 0) {
        count1++;
        if (A[i] % 3 == 0 || A[i] % 5 == 0) {
          count2++;
        }
      }
    }
      if (count1 == count2) {
        A1 = "APPROVED";
      } else if(count1!= count2) {
        A1 = "DENIED";
      }
      System.out.println(A1);
    }
  }