Solid-liquid transition of skyrmions in a two-dimensional chiral magnet