If you and your company are good enough to be accepted by YC, then it probably is, both for you and for YC. It's the classic win-win proposition. YC will probably get a return on their money, and your company will be worth enough more that your share, now 95% instead of 100%, will be worth quite a bit more than it was before their investment.