Maybe, maybe not. The user would have to type both numbers before hitting "enter." This might be awkward.
The user must enter both values before the application code can be started. An event listener could be written to check that there is data in each field before it calls the application method. Let us take a different approach. This is to include a button that the user clicks to start the calculation.