In a regiment, the ratio of number of officers to the number of soldiers was 3 : 31 before a battle. In the battle 6 officers and 22 soldiers were killed. The ratio between the number of officers and the number of soldiers now is 1 : 13. Find the number of officers and soldiers in the regiment before the battle.