#include <iostream>
#include <math.h>
#include <fstream>
#include <cstring>
using namespace std;
int main () {
	ifstream f1("DE002_2.inp");
	ofstream f2("DE002_2.out");
	f1.close()
	f2.close() 
	int a,n;
	string s;
	f1 >> n;
	a=n;
	while (a!=0) {
		if (a%2==0) {
			s='0'+s;
		}
		else {
			s='1'+s;
		}
		a/=2;
	}
	f2 << hex << n << " ";
	f2 << s;
}
