A graph H is common if the number of monochromatic copies of H in a 2-edge-colouring of the complete graph Kn is asymptotically minimised by the random colouring, or equivalently, tH(W)+tH(1−W)≥21−e(H) holds for every graphon W:[0,1]2→[0,1], where tH(.) denotes the homomorphism density of the graph H. Paths and cycles being common is one of the earliest cornerstones in extremal graph theory, due to Mulholland and Smith (1959), Goodman (1959), and Sidorenko (1989).We prove a graph homomorphism inequality that extends the commonality of paths and cycles. Namely, tH(W)+tH(1−W)≥tK2(W)e(H)+tK2(1−W)e(H) whenever H is a path or a cycle and W:[0,1]2→R is a bounded symmetric measurable function.This answers a question of Sidorenko from 1989, who proved a slightly weaker result for even-length paths to prove the commonality of odd cycles. Furthermore, it also settles a recent conjecture of Behague, Morrison, and Noel in a strong form, who asked if the inequality holds for graphons W and odd cycles H. Our proof uses Schur convexity of complete homogeneous symmetric functions, which may be of independent interest.