In open play ref is watching ball and basically 2 or 3 players around ball. At corner there are probably 18-20 players in pen area and potentially and in practice all of them are pushing, pulling, grabbing, obstructing all at the same time. If player A grabs and pulls shirt of player B and player B tries to get free by pushing Player A away. Foul is committed by player A first but if ref only sees the push by Player B then he gives foul against player B.How does the ref make those decisions in open play?