Statistics of quasienergies in chaotic and random systems