A tank and a pail contain a total of 5136 milliliter of water. Jacob pours 314 milliliters of water from the pail into tank. The amount of water in the tank is now 7 times what is left in the pail. How much water was in the pail at first?