Universal scaling functions for site and bond percolations on planar lattices