#include
using namespace std;
int main() {
int maxFar, minFar, step;
cin >> maxFar;
cin >> minFar;
cin >> step;
int f = minFar;
float c = 0;
while(f <= maxFar)
{
c = (int)((5.0/9) * (f - 32));
cout << f << " " << c << endl;
f = f + step;
}
return 0;
}