Submillimeter wave ESR measurements of metamagnetic Y2Cu2O5