Greece close to agreement on bailout