import java.math.BigDecimal;class Main { public static boolean isNumber(String text) { try { new BigDecimal(text); return true; } catch (Exception e) { return false; } }}