Unless the previous owners can tell you how long they've been stored for I'd err on the side of caution and turn them into compost. If they've been stored through an Autumn or Winter in open-topped containers the likelihood of vermin contamination, moulds and mildews is considerable and chickens aren't that intelligent.
If it makes a difference, According to the hand written labels, the oats and beans date from 2014. They are in sealed (but not completely airtight) plastic packs and have been in a steel drum with a lid on.
I don't think that vermin contamination is likely to be an issue, mould, fungus and associated toxins was more my concern.
Apologies for the series of dumb questions, I am new to this and have taken on a place that has been run down for a while and in addition to oats and beans, I am wading through loads of old hay, alpaca fleece and tons of junk while trying to empty the barns but have also unearthed a few treasures.
I hate wasting stuff and can't afford to throw out stuff that will be useful but on the other hand don't want to blight my first forays into keeping livestock with dodgy feed.