Language: C

#include <stdio.h>
#include <stdlib.h>

int x,y;
int sx[200],sy[200],gx[1000],gy[1000],m,n,ss;
void Ssort(){
	int a,b,c;
	for(a=0;a<m-1;a++){
		for(b=a;b<m;b++){
			if(sy[a]>sy[b]){
				c=sy[a];
				sy[a]=sy[b];
				sy[b]=c;
				c=sx[a];
				sx[a]=sx[b];
				sx[b]=c;
			}
			if(sy[a]==sy[b] && sx[a]>sx[b]){
				c=sy[a];
				sy[a]=sy[b];
				sy[b]=c;
				c=sx[a];
				sx[a]=sx[b];
				sx[b]=c;
			}
		}
	}
}
void Gsort(){
	int a,b,c;
	for(a=0;a<n-1;a++){
		for(b=a;b<n;b++){
			if(gy[a]>gy[b]){
				c=gy[a];
				gy[a]=gy[b];
				gy[b]=c;
				c=gx[a];
				gx[a]=gx[b];
				gx[b]=c;
			}
			if(gy[a]==gy[b] && gx[a]>gx[b]){
				c=gy[a];
				gy[a]=gy[b];
				gy[b]=c;
				c=gx[a];
				gx[a]=gx[b];
				gx[b]=c;
			}
		}
	}
}
bool Scheck(int k){
	int a;
	for(a=k;a<n;a++){
		if(sy[ss]<gy[a]-y){
			return false;
		}
		if(sx[ss]+x==gx[a] && sy[ss]+y==gy[a]){
			ss++;
		}
		if(ss==m){
			return true;
		}
	}
	return false;
}
bool Seiza(){
	int a;
	for(a=0;a<n-m+1;a++){
		ss=1;
		x=gx[a]-sx[0];
		y=gy[a]-sy[0];
		if(Scheck(a)==true)return true;
	}
	return false;
	
}
int main(void){
	int a,b;
	scanf("%d",&m);
	for(a=0;a<m;a++){
		scanf("%d %d",&sx[a],&sy[a]);
	}
	Ssort();
	scanf("%d",&n);
	for(a=0;a<n;a++){
		scanf("%d %d",&gx[a],&gy[a]);
	}
	Gsort();
	if(Seiza()==true)printf("%d %d\n",x,y);else printf("-1\n");
}

Compiler output:
main.c:52:1: error: unknown type name 'bool'
   52 | bool Scheck(int k){
      | ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include <stdlib.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c: In function 'Scheck':
main.c:56:32: error: 'false' undeclared (first use in this function)
   56 |                         return false;
      |                                ^~~~~
main.c:56:32: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:56:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:62:32: error: 'true' undeclared (first use in this function)
   62 |                         return true;
      |                                ^~~~
main.c:62:32: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: At top level:
main.c:67:1: error: unknown type name 'bool'
   67 | bool Seiza(){
      | ^~~~
main.c:67:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'Seiza':
main.c:73:31: error: 'true' undeclared (first use in this function)
   73 |                 if(Scheck(a)==true)return true;
      |                               ^~~~
main.c:73:31: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:75:16: error: 'false' undeclared (first use in this function)
   75 |         return false;
      |                ^~~~~
main.c:75:16: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'main':
main.c:90:21: error: 'true' undeclared (first use in this function)
   90 |         if(Seiza()==true)printf("%d %d\n",x,y);else printf("-1\n");
      |                     ^~~~
main.c:90:21: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'