You are either trying to read input from the screen or write to the keyboard.
You should recode your program.