Precise measurement of (KS -> pi+ pi- (gamma))/(KS -> pi0 pi0) with the KLOE detector at DAFNE