Are you sure your console I/O is not broken? It may sound silly, but I have already encountered IDEs (XCode) that omit characters written in the console. That would at least explain the coincidence of (10,30) and (1000,300).
Maybe test with the debugger or when executing directly in the operating system's terminal.