The Yang-Mills flow in four dimensions