import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int[] coins=new int[]{1,2,5,10,20,50,100}; int type=0; int cnt=0; for(int i=0;i<coins.length;i++){ if(n>=coins[i]){ type++; cnt++; n-=coins[i]; } } cnt+=n; System.out.println(type+" "+cnt); } }