Create Pairs.java

Solution to https://www.hackerrank.com/challenges/pairs