{"raw_statement":[{"iden":"statement","content":"罗恩想在他的 $n\\times n$ 的正方形院子里建一个正方形游泳池，但他的院子里有 $T$ 棵树。\n\n你的任务是确定他可以建造的最大的方形游泳池的边长。"},{"iden":"input","content":"第一行一个整数 $n$ ，具体意义见题目描述。\n\n第二行一个整数 $T$ ，具体意义见题目描述。\n\n接下来 $T$ 行，每行两个整数 $x,y$ ，表示在 $(x,y)$ 上有一棵树。"},{"iden":"output","content":"一行，表示游泳池的最大边长。"},{"iden":"note","content":"样例 $1$ 解释：\n\n![](https://cdn.luogu.com.cn/upload/image_hosting/c2b58ek8.png)\n\n样例 $2$ 解释：\n\n![](https://cdn.luogu.com.cn/upload/image_hosting/r7uoub7n.png)\n\n对于 $20\\%$ 的数据：$1\\le n\\le 50,T=1$\n\n对于 $35\\%$ 的数据：$1\\le n\\le 50,1\\le T\\le 10$\n\n对于 $25\\%$ 的数据：$1\\le n\\le 5\\times 10^5,1\\le T\\le 10$\n\n对于 $100\\%$ 的数据：$1\\le n\\le 5\\times 10^5,1\\le T\\le 100$"}],"translated_statement":null,"sample_group":[["5\n1\n2 4","3"],["15\n8\n4 7\n4 1\n14 11\n10 6\n13 4\n4 10\n10 3\n9 14","7"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}