There would be a couple other signs that your car might have been a 400 option car.
What year is it? The '67s say so on the Trim Tag.
Otherwise, there are a couple signs such as does it have the 400 only hood with dual scoops? That doesn't make it one, but would be an indicator if it is the original hood.
Just looking at codes in general, YF could be either 389 or 400.
1968 400 Coupe, verdoro green, black vinyl top, auto 1969 GTO Judge coupe, Carousel Red, manual 1971 Trans Am, cameo white, auto 1970 Buick Skylark Custom Convertible 350-4(driver), Fire Red, white top, auto 1972 Buick GS Stage 1, Royal Blue, black vinyl top, auto