How many distinct 4-digit numbers can be formed by the digits {7,8,3,9,1,2} where digits 8,9,2,3 can appear at most once and the digits 1,7 can appear at most twice?
a) 72
b) 144
c) 216
d) 288