The digits add up to 9. This is divisible by 3 and 9, so 333 is divisible by both 3 and 9.