#include <bits/stdc++.h>
using namespace std;
// this  adds the key value pair in map instead of updating it, dont know how to overcome this???
struct f{
	bool  operator()( int a,  int b){
		return a<b;
	}
};
int main() {
	map<int,int,f> m;
	m[1]=2;
	m[2]=1;
	m[6]=1;
	m[3]=4;
	m[6]=34;
	m[3]=5;
	cout<<m.size()<<"\n";
	for(auto x: m) cout<<x.first<<" "<<x.second<<"\n";
}