First-Order Characterization of Convexity