Problem Statement
Given are two N-dimensional vectors A=(A1,A2,A3,dots,AN) and B=(B1,B2,B3,dots,BN).
Determine whether the inner product of A and B is 0.
In other words, determine whether A1B1+A2B2+A3B3+dots+ANBN=0.
Constraints
- 1leNle100000
- \-100leAile100
- \-100leBile100
- All values in input are integers.
Input is given from Standard Input in the following format:
N
A1 A2 A3 dots AN
B1 B2 B3 dots BN
Output
If the inner product of A and B is 0, print Yes
; otherwise, print No
.
2
-3 6
4 2
Sample Output 1
Yes
The inner product of A and B is (−3)times4+6times2=0.
2
4 5
-1 -3
Sample Output 2
No
The inner product of A and B is 4times(−1)+5times(−3)=−19.
3
1 3 5
3 -6 3
Sample Output 3
Yes
The inner product of A and B is 1times3+3times(−6)+5times3=0.