A store sells small notebooks for ​$8 and large notebooks for ​$16 . If a student buys 6 notebooks and spends ​$72 ​, how many of each size did he​ buy?