Giant gap quantum spin Hall effect and valley-polarized quantum anomalous Hall effect in cyanided bismuth bilayers