# Way to establish the acid/base properties of a compound from its chemical formula?

Is there a way to figure out the acid/base properties of a compound just by looking at the chemical formula?

$\hspace{4.3cm}$
Consider the two compounds above. Both have the formula $\ce{C5H10O2}$, yet one is about 20 orders of magnitude stronger an acid than the other. Without knowing the general structure of a molecule (what functional groups it is comprised of), suffice it to say no, you cannot know how acidic the molecule is.
A structural formula can be useful, as they are textural representations of the chemical structure. It is possible to determine the acidity difference between $\ce{CH3CH2CH2OH}$ and $\ce{(CH3)2CHOH}$, even when both have a molecular formula of $\ce{C3H8O}$.