Reading inputs in java
<p>Hello everyone I'm trying to improve my Java skills by solving some problems from ACM, now the thing is my sample input looks like this :</p>

<pre><code> 3 100
 34 100
 75 250
 27 2147483647
 101 304
 101 303
 -1 -1
</code></pre>

<p>So at first I'm just trying to read them but its not working here is the java code:</p>

<pre><code>import java.io.BufferedInputStream;
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {
        Scanner stdin = new Scanner(new BufferedInputStream(System.in));
        while (stdin.hasNext()) {
            System.out.println(stdin.nextInt() + " and the next " + stdin.nextInt());
        }
    }
}
</code></pre>

<p>I'm trying to send these inputs as an argument, and not by reading them from file, here is how:</p>

<p><img src="http://i41.tinypic.com/j61npu.gif" alt="alt text"></p>

<p>The program just spins(executes) but not printing anything. How can I fix this?</p>
