2010 AIME I Problem 4

Jackie and Phil have two fair coins and a third coin that comes up heads with probability \frac{4}{7}. Jackie flips the three coins, and then Phil flips the three coins. Let \frac{m}{n} be the probability that Jackie gets the same number of heads as Phil, where m and n are relatively prime positive integers. Find m+n.