﻿ Fuzhou University OnlineJudge ﻿
Problem 1528 Stolen Treasure Division

## Problem Description

One night, argentmoon was dreaming. He dreamed that he and oaiei went together to steal treasure, and they got n pieces of the stolen treasures. But the estimated value of each pieces of the treasure are not the same to them. After stealing treasure, how to divide stolen treasures became a problem. If the total value of the treasures argentmoon received according to his standard is not the same as the total value of treasures oaiei received according to oaiei’s standard, it will lead to a contradiction; what is more, they will fight with each other. Finally, they asked their leader--tzw to help them to divide these stolen treasures.

Your task is to judge whether tzw can help them divide those stolen treasures successfully.

## Input

There are multiple test cases. The first line of each test case contains a positive integer n(0<n≤40), indicating there are n stolen treasures. There are n lines followed. The (i+1)-th line contains two numbers ai and oi(0≤ai,oi≤200),indicting the i-th stolen treasure’s value in argentmoon and oaiei’s standards respectively.

## Output

For each test case, print a line containing a word “YES” if tzw can divides the stolen treasures successfully, otherwise print “NO”.

## Sample Input

4 50 38 17 32 29 21 5 6

NO

## Source

FZU 2007 ICPC Qualification Round II

Submit  Back  Status  Discuss
﻿