아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Product

면접 대비

시간 제한1초메모리 제한256 MB

요약
정수 N개가 주어질 때, 나머지 모든 수의 곱과 같은 수가 있는지 찾고 그 수를 출력한다.
난이도

보통10점 중 4점

유형
수학, 구현
정답자
아직 제출이 없습니다

문제

Given a list of numbers, determine whether one of these numbers equals the product of all the other numbers.

입력

The first line of the input file contains a single integer NN --- the number of elements in the initial list  (2≤N≤1052 \leq N \leq 10^5). The next line contains NN space-separated numbers constituting the list. Each of these numbers is an integer not greater than 10910^9 in absolute value.

출력

In the first line of the output file, print Yes or No, depending on whether some number from the list is equal to the product of all the other numbers --- or not. If the answer is Yes, in the second line, print such a number. If several numbers satisfy the conditions of the problem, print any of them.

예제2

  1. 예제 1

    입력
    3
    2 4 2
    
    예상 출력
    Yes
    4
    
  2. 예제 2

    입력
    2
    2 3
    
    예상 출력
    No