In a Berland's zoo there is an enclosure with camels. It is known that camels like to spit. Bob watched these interesting animals for the whole day and registered in his notepad where each animal spitted. Now he wants to know if in the zoo there are two camels, which spitted at each other. Help him to solve this task.

The trajectory of a camel's spit is an arc, i.e. if the camel in position *x* spits *d* meters right, he can hit only the camel in position *x* + *d*, if such a camel exists.
The first line contains integer *n* (1 ≤ *n* ≤ 100) — the amount of camels in the zoo. Each of the following *n* lines contains two integers *x*<sub class="lower-index">*i*</sub> and *d*<sub class="lower-index">*i*</sub> ( - 10<sup class="upper-index">4</sup> ≤ *x*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">4</sup>, 1 ≤ |*d*<sub class="lower-index">*i*</sub>| ≤ 2·10<sup class="upper-index">4</sup>) — records in Bob's notepad. *x*<sub class="lower-index">*i*</sub> is a position of the *i*-th camel, and *d*<sub class="lower-index">*i*</sub> is a distance at which the *i*-th camel spitted. Positive values of *d*<sub class="lower-index">*i*</sub> correspond to the spits right, negative values correspond to the spits left. No two camels may stand in the same position.
#To solve this I can register the positions of camels and  its spits
#If I can find a camel that spitted and that camel spited too the awnser is yes
numCamels = int(input())
dictCamel = {}
listSpit = []
for i in range(numCamels):
    actualCamel, actualSpit = map(int, input().split())    
    #I have a camel in position actualCamel that spitted at actualCamel + actualSpit
    dictCamel[actualCamel] = actualCamel + actualSpit    
#after reading everything I need to see if I have a spit in the same position of a camel to verify if that camel spitted to
spitted = 0
for camel in dictCamel.keys():
    #If a spit position is in the dictCamel I need to verify if that camel spitted in the actual position, basically I need to see if one point to another    
    try:
        if(spitted == 0 and camel == dictCamel[dictCamel[camel]]):
            print('YES')
            spitted = 1
    except:
        pass
#If i didn't find
if(spitted == 0):
    print('NO')
		  	 		 			 			  			 			 					