How do I calculate YTD pay in google sheets?

I have a sheet like this to track the salary and amount paid each month to my employees.
enter image description here

I run a small company but as it got bigger I decided to give pay stubs to each employee.enter image description here

How do I make it so when I input a Emp ID# the Year-to-date pay pops up?