ESR Measurements on One-Dimensional Quantum Ferrimagnets A3Cu3(PO4)4 with A=Sr and Ca in Submillimeter-Wave Region