Screw specification for ceiling electric box
Device (switch) boxes are 6-32. Junction boxes like that one are 8-32. Ground screws are 10-32.

Also, you could buy a ceiling hugger style fan instead of a stem mounted one, and fasten it directly to the ceiling with toggle bolts or similar fasteners, instead of just the box, since that box is most likely not rated for a fan.

Good luck and stay safe!