Those Yamahas have a pretty good reputation, but like all mechanical devices you never know what might happen. Find out if you can why it has sat idle. A compression test (after doing what is in the first sentence below) is in order before any decision to purchase should be considered.
If you make the decision to purchase and because it has sat for a while, don't just start the engine up without turning it over by hand a few times and then using the starter with the emergency stop activated so it wont start. After doing that and after ascertaining everything is in good nick I would consider replacing the oil and filter, and leg oil. I might suspect that the old and stale fuel may also cause problems, so would change/clean the fuel filter and VST filter. Certainly removing the leg and replacing at least the impeller would be in order. Remove and check the thermostat and at the same time note how much salt build up is inside the engine. Remove the internal anodes and replace them as necessary. Remove the prop and grease the splines.