#!/bin/bash

max1=0
max2=0

while read line || [[ -n "$line" ]]
do
    for word in $line
    do
        if [ $word -ge $max1 ]
        	then
        	max2=$max1
        	max1=$word
        fi
    done
done < "$1"

echo $(($max1+$max2))
echo $(($max1*$max2))