import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in Actual solution is at the top
 *
 * @author Silviase
 */
public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    Scanner in = new Scanner(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    BPapersPlease solver = new BPapersPlease();
    solver.solve(1, in, out);
    out.close();
  }

  static class BPapersPlease {

    public void solve(int testNumber, Scanner in, PrintWriter out) {
      boolean f = true;
      int n = in.nextInt();
      int[] a = new int[n];
      for (int i = 0; i < n; i++) {
        a[i] = in.nextInt();
        if (a[i] % 2 == 0) {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        }
      }

      out.println(f ? "APPROVED" : "DENIED");
    }

  }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    Scanner in = new Scanner(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    BPapersPlease solver = new BPapersPlease();
    solver.solve(1, in, out);
    out.close();
  }

  static class BPapersPlease {

    public void solve(int testNumber, Scanner in, PrintWriter out) {
      boolean f = true;
      int n = in.nextInt();
      int[] a = new int[n];
      for (int i = 0; i < n; i++) {
        a[i] = in.nextInt();
        if (a[i] % 2 == 0) {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        }
      }

      out.println(f ? "APPROVED" : "DENIED");
    }

  }
} Main public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    Scanner in = new Scanner(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    BPapersPlease solver = new BPapersPlease();
    solver.solve(1, in, out);
    out.close();
  } main {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    Scanner in = new Scanner(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    BPapersPlease solver = new BPapersPlease();
    solver.solve(1, in, out);
    out.close();
  } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) BPapersPlease solver = new BPapersPlease(); solver new BPapersPlease() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class BPapersPlease {

    public void solve(int testNumber, Scanner in, PrintWriter out) {
      boolean f = true;
      int n = in.nextInt();
      int[] a = new int[n];
      for (int i = 0; i < n; i++) {
        a[i] = in.nextInt();
        if (a[i] % 2 == 0) {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        }
      }

      out.println(f ? "APPROVED" : "DENIED");
    }

  } BPapersPlease public void solve(int testNumber, Scanner in, PrintWriter out) {
      boolean f = true;
      int n = in.nextInt();
      int[] a = new int[n];
      for (int i = 0; i < n; i++) {
        a[i] = in.nextInt();
        if (a[i] % 2 == 0) {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        }
      }

      out.println(f ? "APPROVED" : "DENIED");
    } solve {
      boolean f = true;
      int n = in.nextInt();
      int[] a = new int[n];
      for (int i = 0; i < n; i++) {
        a[i] = in.nextInt();
        if (a[i] % 2 == 0) {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        }
      }

      out.println(f ? "APPROVED" : "DENIED");
    } boolean f = true; f true int n = in.nextInt(); n in.nextInt() in.nextInt in int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) {
        a[i] = in.nextInt();
        if (a[i] % 2 == 0) {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        }
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        a[i] = in.nextInt();
        if (a[i] % 2 == 0) {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        }
      } {
        a[i] = in.nextInt();
        if (a[i] % 2 == 0) {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        }
      } a[i] = in.nextInt() a[i] a i in.nextInt() in.nextInt in if (a[i] % 2 == 0) {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        } a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        } f = f && (a[i] % 3 == 0 || a[i] % 5 == 0) f f && (a[i] % 3 == 0 || a[i] % 5 == 0) f (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 out.println(f ? "APPROVED" : "DENIED") out.println out f ? "APPROVED" : "DENIED" f "APPROVED" "DENIED" int testNumber testNumber Scanner in in PrintWriter out out public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    Scanner in = new Scanner(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    BPapersPlease solver = new BPapersPlease();
    solver.solve(1, in, out);
    out.close();
  }

  static class BPapersPlease {

    public void solve(int testNumber, Scanner in, PrintWriter out) {
      boolean f = true;
      int n = in.nextInt();
      int[] a = new int[n];
      for (int i = 0; i < n; i++) {
        a[i] = in.nextInt();
        if (a[i] % 2 == 0) {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        }
      }

      out.println(f ? "APPROVED" : "DENIED");
    }

  }
} public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    Scanner in = new Scanner(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    BPapersPlease solver = new BPapersPlease();
    solver.solve(1, in, out);
    out.close();
  }

  static class BPapersPlease {

    public void solve(int testNumber, Scanner in, PrintWriter out) {
      boolean f = true;
      int n = in.nextInt();
      int[] a = new int[n];
      for (int i = 0; i < n; i++) {
        a[i] = in.nextInt();
        if (a[i] % 2 == 0) {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        }
      }

      out.println(f ? "APPROVED" : "DENIED");
    }

  }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in Actual solution is at the top
 *
 * @author Silviase
 */
public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    Scanner in = new Scanner(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    BPapersPlease solver = new BPapersPlease();
    solver.solve(1, in, out);
    out.close();
  }

  static class BPapersPlease {

    public void solve(int testNumber, Scanner in, PrintWriter out) {
      boolean f = true;
      int n = in.nextInt();
      int[] a = new int[n];
      for (int i = 0; i < n; i++) {
        a[i] = in.nextInt();
        if (a[i] % 2 == 0) {
          f = f && (a[i] % 3 == 0 || a[i] % 5 == 0);
        }
      }

      out.println(f ? "APPROVED" : "DENIED");
    }

  }
}

