#include <algorithm>
#include <cstdio>
#include <set>
#include <vector>

using namespace std;

typedef long long llint;

#define MAX 50

int n, d;
llint x[MAX], y[MAX];

llint interpolacija( llint x1, llint y1, llint x2, llint y2, llint x ) {
   return y1 + (x-x1) * (y2-y1) / (x2-x1);
}

llint signal( llint x0 ) {
   int i = 0;
   while( i < n && x[i] < x0 ) ++i;

   if( i == 0 ) return interpolacija( x[0], y[0], x[1], y[1], x0 );
   if( i == n ) return interpolacija( x[n-2], y[n-2], x[n-1], y[n-1], x0 );
   return interpolacija( x[i-1], y[i-1], x[i], y[i], x0 );
}

llint filtar( llint x0 ) {
   vector<llint> yy;
   for( int dx = -d; dx <= d; ++dx )
      yy.push_back( signal( x0+dx ) );
   sort( yy.begin(), yy.end() );
   return yy[d];
}

int main( void ) {
   scanf( "%d", &n );
   for( int i = 0; i < n; ++i ) scanf( "%lld%lld", &x[i], &y[i] );
   scanf( "%d", &d );

   set<llint> xx;
   for( int i = 0; i < n; ++i ) 
      for( int dx = -d; dx <= d; ++dx )
         xx.insert( x[i] + dx );

   printf( "%d\n", xx.size() );
   for( set<llint>::iterator it = xx.begin(); it != xx.end(); ++it ) 
      printf( "%lld %lld\n", *it, filtar(*it) );

   return 0;
}
