Which Yale program? That would be nearly impossible if you are at the main campus in New Haven. You do NOT want to have a long commute ahead of you on your way into, or at the end of, a long shift.
The Greenwich campus, which is halfway between NYC and New Haven, is a difficult commute to and from the city on a daily basis as well. A friend of mine has been doing it throughout intern year and has spent a lot of time on the road every day. Your time is such a premium as a resident - and especially as an intern. I wouldn't do it.