Juan goes to a bank and gets change for a $50 bill consisting of all $5 and $1 bills. There are 22 bills in all. How many of each kind are there?