s = input() ml = 0 # 数字串最长个数,初始赋为0 # 1.将字符串中非数字的字符全替换成空格 for i in s: if not i.isdigit(): s = s.replace(i," ") l = s.split() # 数字串列表 # 2.找出最长数子串个数 for j in l: if len(j) > ml: ml = len(j) # 3.输出最长的数子串 for k in l: if len(k) == ml: print(k,end="") # 不换行输出 print(f",{ml}") # 格式输出