You can only run two operations at the same time if you have more than one CPU.
However there are approximations. Look up "multithreading". It's a lot of fun.
Or if you prefer to keep to a single thread, you could check one for input, then check the other, then do whatever other stuff the program is supposed to do, and so on.