which waves can travel through both solids and liquids