Engine separates from train in UP