Measurement of CP asymmetries in B0→ϕK0 and B0→K+K-Ks0 decays