Language: C++

using System.Linq;
using System.Collections.Generic;
using static System.Console;
using static System.Math;
class Z { static void Main() => new K(); }
class K
{
	int F => int.Parse(Str);
	int[] G => Strs.Select(int.Parse).ToArray();
	string Str => ReadLine();
	string[] Strs => Str.Split();
	struct Point
	{
		public readonly int x, y;
		public Point(int[] a) : this(a[0], a[1]) { }
		public Point(int a, int b) { x = a; y = b; }
		public bool SmallerThan(Point p) => x < p.x && y < p.y;
	}
	public K()
	{
		var N = F;
		var a = new Point[N];
		var b = new Point[N];
		for (var i = 0; i < N; i++) a[i] = new Point(G);
		for (var i = 0; i < N; i++) b[i] = new Point(G);
		var g = new Dinic(2 * N + 2);
		for (var i = 0; i < N; i++) for (var j = 0; j < N; j++) if (a[i].SmallerThan(b[j])) g.AddEdge(i + 1, j + N + 1);
		for (var i = 0; i < N; i++) { g.AddEdge(0, i + 1); g.AddEdge(i + N + 1, 2 * N + 1); }
		WriteLine(g.MaxFlow(0, 2 * N + 1));
	}
}
class Dinic
{
	public const long INF = 4011686018427387913L;
	class Edge
	{
		public readonly int To;
		public long Capacity;
		public Edge Reverse;
		public Edge(int t, long c, Edge r) { To = t; Capacity = c; Reverse = r; }
	}
	public Dinic(int v)
	{
		V = v;
		level = new int[V];
		es = new List<Edge>[v];
		for (var i = 0; i < V; i++) es[i] = new List<Edge>();
	}
	readonly int V;
	int[] iter;
	readonly int[] level;
	readonly List<Edge>[] es;
	public void AddEdge(int f, int t, long c = 1)
	{
		var e1 = new Edge(t, c, null);
		var e2 = new Edge(f, 0, e1);
		e1.Reverse = e2;
		es[f].Add(e1);
		es[t].Add(e2);
	}
	long DFS(int v, int t, long f)
	{
		if (v == t) return f;
		for (; iter[v] < es[v].Count; iter[v]++)
		{
			var e = es[v][iter[v]];
			if (level[v] >= level[e.To] || e.Capacity <= 0) continue;
			var g = DFS(e.To, t, Min(e.Capacity, f));
			if (g > 0) { e.Capacity -= g; e.Reverse.Capacity += g; return g; }
		}
		return 0;
	}
	void BFS(int s)
	{
		for (var i = 0; i < V; i++) level[i] = -1;
		var queue = new Queue<int>();
		level[s] = 0;
		queue.Enqueue(s);
		while (queue.Count > 0)
		{
			var v = queue.Dequeue();
			foreach (var e in es[v]) if (e.Capacity > 0 && level[e.To] < 0) { level[e.To] = level[v] + 1; queue.Enqueue(e.To); }
		}
	}
	public long MaxFlow(int s, int t)
	{
		var flow = 0L;
		while (true)
		{
			BFS(s);
			if (level[t] < 0) return flow;
			iter = new int[V];
			while (true)
			{
				var f = DFS(s, t, INF);
				if (f <= 0) break;
				flow += f;
			}
		}
	}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System.Linq;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'static'
    3 | using static System.Console;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'static'
    4 | using static System.Math;
      |       ^~~~~~
a.cc:5:33: error: invalid pure specifier (only '= 0' is allowed) before 'new'
    5 | class Z { static void Main() => new K(); }
      |                                 ^~~
a.cc:5:23: error: initializer specified for static member function 'static void Z::Main()'
    5 | class Z { static void Main() => new K(); }
      |                       ^~~~
a.cc:5:43: error: expected ';' after class definition
    5 | class Z { static void Main() => new K(); }
      |                                           ^
      |                                           ;
a.cc:9:12: error: expected unqualified-id before '[' token
    9 |         int[] G => Strs.Select(int.Parse).ToArray();
      |            ^
a.cc:10:9: error: 'string' does not name a type
   10 |         string Str => ReadLine();
      |         ^~~~~~
a.cc:11:9: error: 'string' does not name a type
   11 |         string[] Strs => Str.Split();
      |         ^~~~~~
a.cc:14:23: error: expected ':' before 'readonly'
   14 |                 public readonly int x, y;
      |                       ^~~~~~~~~
      |                       :
a.cc:14:24: error: 'readonly' does not name a type
   14 |                 public readonly int x, y;
      |                        ^~~~~~~~
a.cc:15:23: error: expected ':' before 'Point'
   15 |                 public Point(int[] a) : this(a[0], a[1]) { }
      |                       ^~~~~~
      |                       :
a.cc:15:36: error: expected ',' or '...' before 'a'
   15 |                 public Point(int[] a) : this(a[0], a[1]) { }
      |                                    ^
a.cc:16:23: error: expected ':' before 'Point'
   16 |                 public Point(int a, int b) { x = a; y = b; }
      |                       ^~~~~~
      |                       :
a.cc:17:23: error: expected ':' before 'bool'
   17 |                 public bool SmallerThan(Point p) => x < p.x && y < p.y;
      |                       ^~~~~
      |                       :
a.cc:17:53: error: invalid pure specifier (only '= 0' is allowed) before 'x'
   17 |                 public bool SmallerThan(Point p) => x < p.x && y < p.y;
      |                                                     ^
a.cc:18:10: error: expected ';' after struct definition
   18 |         }
      |          ^
      |          ;
a.cc:19:15: error: expected ':' before 'K'
   19 |         public K()
      |               ^~
      |               :
a.cc:31:2: error: expected ';' after class definition
   31 | }
      |  ^
      |  ;
a.cc:8:16: error: expected primary-expression before '>' token
    8 |         int F => int.Parse(Str);
      |                ^
a.cc:8:18: error: expected primary-expression before 'int'
    8 |         int F => int.Parse(Str);
      |                  ^~~
a.cc: In constructor 'K::Point::Point(int*)':
a.cc:15:41: error: expected identifier before 'this'
   15 |                 public Point(int[] a) : this(a[0], a[1]) { }
      |                                         ^~~~
a.cc:15:41: error: expected '{' before 'this'
a.cc: In constructor 'K::Point::Point(int, int)':
a.cc:16:46: error: 'x' was not declared in this scope
   16 |                 public Point(int a, int b) { x = a; y = b; }
      |                                              ^
a.cc:16:53: error: 'y' was not declared in this scope
   16 |                 public Point(int a, int b) { x = a; y = b; }
      |                                                     ^
a.cc: In constructor 'K::K()':
a.cc:21:17: error: 'var' was not declared in this scope
   21 |                 var N = F;
      |                 ^~~
a.cc:22:21: error: expected ';' before 'a'
   22 |                 var a = new Point[N];
      |                     ^
a.cc:23:21: error: expected ';' before 'b'
   23 |                 var b = new Point[N];
      |                     ^
a.cc:24:26: error: expected ';' before 'i'
   24 |                 for (var i = 0; i < N; i++) a[i] = new Point(G);
      |                          ^
a.cc:24:33: error: 'i' was not declared in this scope
   24 |                 for (var i = 0; i < N; i++) a[i] = new Point(G);
      |                                 ^
a.cc:24:37: error: 'N' was not declared in this scope
   24 |                 for (var i = 0; i < N; i++) a[i] = new Point(G);
      |                                     ^
a.cc:24:45: error: 'a' was not declared in this scope
   24 |                 for (var i = 0; i < N; i++) a[i] = new Point(G);
      |                                             ^
a.cc:24:62: error: 'G' was not declared in this scope
   24 |                 for (var i = 0; i < N; i++) a[i] = new Point(G);
      |                                                              ^
a.cc:25:26: error: expected ';' before 'i'
   25 |                 for (var i = 0; i < N; i++) b[i] = new Point(G);
      |                          ^
a.cc:25:33: error: 'i' was not declared in this scope
   25 |                 for (var i = 0; i < N; i++) b[i] = new Point(G);
      |                                 ^
a.cc:25:37: error: 'N' was not declared in this scope
   25 |                 for (var i = 0; i < N; i++) b[i] = new Point(G);
      |                                     ^
a.cc:25:45: error: 'b' was not declared in this scope
   25 |                 for (var i = 0; i < N; i++) b[i] = new Point(G);
      |                                             ^
a.cc:25:62: error: 'G' was not declared in this scope
   25 |                 for (var i = 0; i < N; i++) b[i] = new Point(G);
      |                                                              ^
a.cc:26:21: error: expected ';' before 'g'
   26 |                 var g = new Dinic(2 * N + 2);
      |                     ^
a.cc:27:26: error: expected ';' before 'i'
   27 |                 for (var i = 0; i < N; i++) for (var j = 0; j < N; j++) if (a[i].SmallerThan(b[j])) g.AddEdge(i + 1, j + N + 1);
      |                          ^
a.cc:27:33: error: 'i' was not declared in this scope
   27 |                 for (var i = 0; i < N; i++) for (var j = 0; j < N; j++) if (a[i].SmallerThan(b[j])) g.AddEdge(i + 1, j + N + 1);
      |                                 ^
a.cc:27:37: error: 'N' was not declared in this scope
   27 |                 for (var i = 0; i < N; i++) for (var j = 0; j < N; j++) if (a[i].SmallerThan(b[j])) g.AddEdge(i + 1, j + N + 1);
      |                                     ^
a.cc:27:54: error: expected ';' before 'j'
   27 |                 for (var i = 0; i < N; i++) for (var j = 0; j < N; j++) if (a[i].SmallerThan(b[j])) g.AddEdge(i + 1, j + N + 1);
      |                                                      ^
a.cc:27:61: error: 'j' was not declared in this scope
   27 |                 for (var i = 0; i < N; i++) for (var j = 0; j < N; j++) if (a[i].SmallerThan(b[j])) g.AddEdge(i + 1, j + N + 1);
      |                                                             ^
a.cc:27:77: error: 'a' was not declared in this scope
   27 |                 for (var i = 0; i < N; i++) for (var j = 0; j < N; j++) if (a[i].SmallerThan(b[j])) g.AddEdge(i + 1, j + N + 1);
      |                                                                             ^
a.cc:27:94: error: 'b' was not declared in this scope
   27 |                 for (var i = 0; i < N; i++) for (var j = 0; j < N; j++) if (a[i].SmallerThan(b[j])) g.AddEdge(i + 1, j + N + 1);
      |                                                                                              ^
a.cc:27:101: error: 'g' was not declared in this scope
   27 |                 for (var i = 0; i < N; i++) for (var j = 0; j < N; j++) if (a[i].SmallerThan(b[j])) g.AddEdge(i + 1, j + N + 1);
      |                                                                                                     ^
a.cc:28:26: error: expected ';' before 'i'
   28 |                 for (var i = 0; i < N; i++) { g.AddEdge(0, i + 1); g.AddEdge(i + N + 1, 2 * N + 1); }
      |                          ^
a.cc:28:33: error: 'i' was not declared in this scope
   28 |                 for (var i = 0; i < N; i++) { g.AddEdge(0, i + 1); g.AddEdge(i + N + 1, 2 * N + 1); }
      |                                 ^
a.cc:28:37: error: 'N' was not declared in this scope
   28 |                 for (var i = 0; i < N; i++) { g.AddEdge(0, i + 1); g.AddEdge(i + N + 1, 2 * N + 1); }
      |                                     ^
a.cc:28:47: error: 'g' was not declared in this scope
   28 |                 for (var i = 0; i < N; i++) { g.AddEdge(0, i + 1); g.AddEdge(i + N + 1, 2 * N + 1); }
      |                                               ^
a.cc:29:27: error: 'g' was not declared in this scope
   29 |                 WriteLine(g.MaxFlow(0, 2 * N + 1));
      |                           ^
a.cc:29:44: error: 'N' was not declared in this scope
   29 |                 WriteLine(g.MaxFlow(0, 2 * N + 1));
      |                                            ^
a.cc:29:17: error: 'WriteLine' was not declared in this scope
   29 |                 WriteLine(g.MaxFlow(0, 2 * N + 1));
      |                 ^~~~~~~~~
a.cc: At global scope:
a.cc:34:15: error: expected ':' before 'const'
   34 |         public const long INF = 4011686018427387913L;
      |               ^~~~~~
      |               :
a.cc:37:23: error: expected ':' before 'readonly'
   37 |                 public readonly int To;
      |                       ^~~~~~~~~
      |                       :
a.cc:37:24: error: 'readonly' does not name a type
   37 |                 public readonly int To;
      |                        ^~~~~~~~
a.cc:38:23: error: expected ':' before 'long'
   38 |                 public long Capacity;
      |                       ^~~~~
      |                       :
a.cc:39:23: error: expected ':' before 'Ed