function Main(input) {
  var tmp = input.trim().split('\n')
  var N = parseInt(tmp[0])
  var Aarr = tmp[1].split(' ')

  var result = 'APPROVED'

  for (var i = 0; i < N; i++) {
    if (Aarr[i] % 2 === 0) {
      if (!(Aarr[i] % 3 === 0 || Aarr[i] % 5 === 0)) {
        result = 'DENIED'
      }
    }
  }

  console.log(result)
  return result
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'))