Mr.Santos is buying two types of gift cards to give as prizes to employees at the company picnic. He will buy resteraunt cards that each cost $40 and movie theatre gift cards that each cost $30. He has $510 to buy a total of 15 gift cards. How many of each type of gift cards can Mr.Santos buy?