We prove identities of Liouville type on sums of even integer functions ranging over sets of relatively prime pairs and relatively prime quadruples. Among applications, we shall count the number of solutions of the Diophantine equations and in positive integers under certain relative primality conditions.