What you need is a rafter span table, if by beam you mean the rafters, and you are using dimensional lumber. Not sure if you mean a span of 25'; if so that may be pretty substantial, esp. If snow load is a thing where you are...
If you mean the beam supporting the outer end of the rafters, you'll not be getting a 40' unsupported span.. and will need to do some math. Rob Roy's 'Timber Framing for the Rest of Us' has some good content for this, but I am sure there are plenty of other options.
If you have not built before, keeping things at say 10-13 foot spn will make the job easier and siutable logs will be easier to find.
Also you may get away with a tripod to left them rather than a crane
John Daley Bendigo, Australia
The Enemy of progress is the hope of a perfect plan