An automated subtraction of NLO EW infrared divergences