title: How to scan input integers line by line?
body: <p>We want to write a program to solve two <code>"Ax2+Bx+C=0"</code> form equations.</p>
  
  <p>When coefficients of equations <code>Ax2+Bx+C=0</code> are entered 1 line per equation, it may look like the following:</p>
  
  <pre><code>2   3       // linear equation when the coefficient for the term x2 is zero
  
  4   5   6   // quadratic equation
  </code></pre>
  
  <p>nextInt() won't tell us whether 4 is the third number of the first line or the first number of the second line. That is, the below input will return exactly the same information.</p>
  
  <pre><code>2   3   4    // quadratic equation
  
  5   6          // linear equation
  </code></pre>
  
  <p>Both inputs are also no different from <code>2 3 4 5 6</code> for nextInt()</p>
  
  <p>So how can I scan those coefficients line by line?</p>