The figure below contains seven circles arranged in a hexagonal shape. Each circle is to contain a different integer between 1 and 9, inclusive, such that the sum of the three integers contained within any triangle is divisible by 3. In how many ways can this be done? Two ways that differ only by rotation or reflection are distinguishable.