51. A and B jointly recite a four-character idiom. As a result, A got $\frac{1}{9}$ of the total idioms wrong, B only got 5 idioms right. Also, the number of idioms both got right is $\frac{1}{6}$ of the total. Therefore, A got $\qquad$ idioms right.
Reference answer: 16