Pairs With Equal Sum

easy
1. You are given an array(arr) of distinct integers.
2. You have to find if there are two pairs(A, B) and (C, D) present in the given array which satisfies the condition A+B = C+D.

Input Format

A number N arr1 arr2.. N numbers

Output Format

true/false

Constraints

1 <= N <= 10^3
-10^9 <= arr[i] <= 10^9 

Example

Input
8
1 2 998 72 87576 21 45 -1
Output
false
Previous
Count Of Subarrays With Equal Number Of 0s 1s And 2s
Next
Recurring Sequence In A Fraction

Related Questions