import java.util.Scanner;
public class CELSIUS {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int cel,min,step,max;
min=input.nextInt();
max=input.nextInt();
step=input.nextInt();
while(min<=max){
double temp;
double c=0.55;
temp=c*(min-32);
cel=(int)temp;
System.out.println(min+" "+cel);
min=min+step;
}
}
}