TLE '17 Contest 8 P1 - Artificial Intelligence

View as PDF

Points: 3 (partial)
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
Artificial intelligence.

Fax McClad, Croneria's most disruptively innovative bounty hunter, plans to use artificial intelligence in order to track down the Dankey Kang Gang.

But, Fax doesn't know much about the artificial intelligence field, so he decides to hire somebody to do it for him. Luckily, you have been selected for an interview!

Advanced artificial intelligence algorithms require good understanding of linear algebra, so in your interview, Fax asks you some linear algebra questions.

We say that a function defined on the real numbers is a linear transformation if and for all real .

Given pairs in the form , Fax wants you to tell him if could be a linear transformation or not. You have failed several linear algebra exams before, and you definitely don't want to fail this interview. Can you answer Fax's question?

Input Specification

The first line of input will contain , , the number of pairs.

lines of input follow. Each line will contain two integers, representing the pair . The absolute value of these integers will not exceed .

For of the points, .

Output Specification

Output yes if could be a linear transformation, otherwise, output no if it is definitely not.

Sample Input 1

2
1 2
2 4

Sample Output 1

yes

Sample Input 2

3
1 2
2 1
3 5

Sample Output 2

no