#C7981. Special Sum Checker

    ID: 51912 Type: Default 1000ms 256MiB

Special Sum Checker

Special Sum Checker

Given an array of integers, your task is to determine whether the sum of these integers is a special number.

A number is defined as special if its decimal representation (including a negative sign if present) contains at least one of the digits 5 or 9.

For example, if the sum of the array is 15 (which contains the digit 5), the output should be YES. If the sum is 27 (which contains neither 5 nor 9), the output should be NO.

You are required to read from stdin and output your answer to stdout.

inputFormat

The input is read from stdin and is formatted as follows:

  1. The first line contains a single integer n, representing the number of elements in the array.
  2. The second line contains n space-separated integers.

outputFormat

Output a single line to stdout containing YES if the sum of the array is a special number, and NO otherwise.

## sample
5
1 2 3 4 5
YES