Sum Equals To Sum

easy
1. Given an array A of distinct integers. The task is to find if there are two pairs (a, b) and (c, d) such that a+b = c+d, and elements of array are distinct.

Input Format

First line contains N,(number of elements of array). Second line of every test case consists of elements of array.

Output Format

Return a boolean value

Constraints

1 <= N <= 10^5
 1 <= Ai <= 10^6

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
7
3 4 7 1 2 9 8
Output
true
Previous
Pepcoding New System
Next
Sum Indexes

Related Questions