Influence of Mn-O-Mn bond angle on the magnetic and electronic properties in YBaMn2O5.