import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.TreeMap;

public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int A[] = new int[N];
    for(int i = 0;i < N;i++){
      A[i] = scanner.nextInt();
    }
    String answer = "APPROVED";
    for(int i = 0;i < N;i++){
      int a = A[i];
      if(a % 2 == 0){
        if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        }
      }
    }
    System.out.println(answer);
  }
} import java.util.Scanner; Scanner java.util import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util import java.util.Map; Map java.util import java.util.TreeMap; TreeMap java.util public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int A[] = new int[N];
    for(int i = 0;i < N;i++){
      A[i] = scanner.nextInt();
    }
    String answer = "APPROVED";
    for(int i = 0;i < N;i++){
      int a = A[i];
      if(a % 2 == 0){
        if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        }
      }
    }
    System.out.println(answer);
  }
} Main public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int A[] = new int[N];
    for(int i = 0;i < N;i++){
      A[i] = scanner.nextInt();
    }
    String answer = "APPROVED";
    for(int i = 0;i < N;i++){
      int a = A[i];
      if(a % 2 == 0){
        if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        }
      }
    }
    System.out.println(answer);
  } main {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int A[] = new int[N];
    for(int i = 0;i < N;i++){
      A[i] = scanner.nextInt();
    }
    String answer = "APPROVED";
    for(int i = 0;i < N;i++){
      int a = A[i];
      if(a % 2 == 0){
        if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        }
      }
    }
    System.out.println(answer);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int A[] = new int[N]; A new int[N] N for(int i = 0;i < N;i++){
      A[i] = scanner.nextInt();
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      A[i] = scanner.nextInt();
    } {
      A[i] = scanner.nextInt();
    } A[i] = scanner.nextInt() A[i] A i scanner.nextInt() scanner.nextInt scanner String answer = "APPROVED"; answer "APPROVED" for(int i = 0;i < N;i++){
      int a = A[i];
      if(a % 2 == 0){
        if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        }
      }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      int a = A[i];
      if(a % 2 == 0){
        if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        }
      }
    } {
      int a = A[i];
      if(a % 2 == 0){
        if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        }
      }
    } int a = A[i]; a A[i] A i if(a % 2 == 0){
        if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        }
      } a % 2 == 0 a % 2 a 2 0 {
        if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        }
      } if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        } !(a % 3 == 0 || a % 5 == 0) (a % 3 == 0 || a % 5 == 0) a % 3 == 0 a % 3 a 3 0 a % 5 == 0 a % 5 a 5 0 {
          answer = "DENIED";
          break;
        } answer = "DENIED" answer "DENIED" break; System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int A[] = new int[N];
    for(int i = 0;i < N;i++){
      A[i] = scanner.nextInt();
    }
    String answer = "APPROVED";
    for(int i = 0;i < N;i++){
      int a = A[i];
      if(a % 2 == 0){
        if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        }
      }
    }
    System.out.println(answer);
  }
} public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int A[] = new int[N];
    for(int i = 0;i < N;i++){
      A[i] = scanner.nextInt();
    }
    String answer = "APPROVED";
    for(int i = 0;i < N;i++){
      int a = A[i];
      if(a % 2 == 0){
        if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        }
      }
    }
    System.out.println(answer);
  }
} Main
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.TreeMap;

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