Dongha failed another course this semester and landed on academic probation again. To stay off the list next time, he decided to study.
Dongha wondered how much study time turns into how many points, so he surveyed N students. Student i studied for xi hours and scored yi points.
From this data he wants to estimate the exam score after x hours of study as f(x)=ax+b. Find a and b for him.

A function f(x) that predicts an exam score from study time should keep the gap between f(xi) and yi small on every record (xi,yi).
RSS (residual sum of squares) turns that idea into a formula. The smaller the RSS, the better the model fits the data.
RSS=∑i=1N(yi−f(xi))2
Among the positive integers a and b that are at most 100, find the pair that minimizes RSS. The intermediate values grow large, so watch out for overflow.