Sam has twice as many dimes as quarters and two less nickels than dimes. If Sam has a total of $5.40, how many of each coin does he have?