#include <bits/stdc++.h>

#define int long long
#define fi first
#define se second

using namespace std;

//const int MAXN = 100005;
//const int MOD = 1e9 + 7;

int n;

int get(int x1, int y1, int x2, int y2) {
    cout << '?' << ' ' << x1 + 1 << ' ' << y1 + 1 << ' ' << x2 + 1 << ' ' << y2 + 1 << '\n';
    fflush(stdout);
    int ans;
    cin >> ans;
    if (ans == -1) {
        exit(0);
    }
    return ans;
}

int ans(int x1, int y1, int x2, int y2) {
    cout << '!' << ' ' << x1 + 1 << ' ' << y1 + 1 << ' ' << x2 + 1 << ' ' << y2 + 1 << '\n';
    fflush(stdout);
    exit(0);
}

int find_in_col(int col) {
    int l = -1, r = n - 1;
    while (r - l > 1) {
        int m = (l + r) / 2;
        int x = get(0, col, m, col);
        if (x % 2) {
            r = m;
        } else {
            l = m;
        }
    }
    return r;
}

int find_in_row(int row) {
    int l = -1, r = n - 1;
    while (r - l > 1) {
        int m = (l + r) / 2;
        int x = get(row, 0, row, m);
        if (x % 2) {
            r = m;
        } else {
            l = m;
        }
    }
    return r;
}

signed main() {
    cin.tie(0);
    cout.tie(0);
    ios_base :: sync_with_stdio(0);
    cin >> n;
    vector<int> cols;
    for (int i = 0, last = 0; i < n; i++) {
        int x = get(0, 0, n - 1, i);
        if (x % 2 != last % 2) {
            cols.push_back(i);
        }
        last = x;
    }
    if (cols.size() == 2) {
        int x1 = find_in_col(cols[0]);
        int x2 = find_in_col(cols[1]);
        ans(x1, cols[0], x2, cols[1]);
    }
    vector<int> rows;
    for (int i = 0, last = 0; i < n; i++) {
        int x = get(0, 0, i, n - 1);
        if (x % 2 != last % 2) {
            rows.push_back(i);
        }
        last = x;
    }
    int y1 = find_in_row(rows[0]);
    ans(rows[0], y1, rows[1], y1);
    return 0;
}


#include <bits/stdc++.h>

#define int long long
#define fi first
#define se second

using namespace std;

//const int MAXN = 100005;
//const int MOD = 1e9 + 7;

int n;

int get(int x1, int y1, int x2, int y2) {
    cout << '?' << ' ' << x1 + 1 << ' ' << y1 + 1 << ' ' << x2 + 1 << ' ' << y2 + 1 << '\n';
    cout.flush();
    int ans;
    cin >> ans;
    if (ans == -1) {
        exit(0);
    }
    return ans;
}

int ans(int x1, int y1, int x2, int y2) {
    cout << '!' << ' ' << x1 + 1 << ' ' << y1 + 1 << ' ' << x2 + 1 << ' ' << y2 + 1 << '\n';
    cout.flush();
    exit(0);
}

int find_in_col(int col) {
    int l = -1, r = n - 1;
    while (r - l > 1) {
        int m = (l + r) / 2;
        int x = get(0, col, m, col);
        if (x % 2) {
            r = m;
        } else {
            l = m;
        }
    }
    return r;
}

int find_in_row(int row) {
    int l = -1, r = n - 1;
    while (r - l > 1) {
        int m = (l + r) / 2;
        int x = get(row, 0, row, m);
        if (x % 2) {
            r = m;
        } else {
            l = m;
        }
    }
    return r;
}

signed main() {
    cin.tie(0);
    cout.tie(0);
    ios_base :: sync_with_stdio(0);
    cin >> n;
    vector<int> cols;
    for (int i = 0, last = 0; i < n; i++) {
        int x = get(0, 0, n - 1, i);
        if (x % 2 != last % 2) {
            cols.push_back(i);
        }
        last = x;
    }
    if (cols.size() == 2) {
        int x1 = find_in_col(cols[0]);
        int x2 = find_in_col(cols[1]);
        ans(x1, cols[0], x2, cols[1]);
    }
    vector<int> rows;
    for (int i = 0, last = 0; i < n; i++) {
        int x = get(0, 0, i, n - 1);
        if (x % 2 != last % 2) {
            rows.push_back(i);
        }
        last = x;
    }
    int y1 = find_in_row(rows[0]);
    cout << rows[0] << ' ' << y1 << ' ' << rows[1] << ' ' << y1;
    return 0;
    ans(rows[0], y1, rows[1], y1);
    return 0;
}


#include <bits/stdc++.h>

#define int long long
#define fi first
#define se second

using namespace std;

//const int MAXN = 100005;
//const int MOD = 1e9 + 7;

int n;

int get(int x1, int y1, int x2, int y2) {
    cout << '?' << ' ' << x1 + 1 << ' ' << y1 + 1 << ' ' << x2 + 1 << ' ' << y2 + 1 << '\n';
    cout.flush();
    int ans;
    cin >> ans;
    if (ans == -1) {
        exit(0);
    }
    return ans;
}

int ans(int x1, int y1, int x2, int y2) {
    cout << '!' << ' ' << x1 + 1 << ' ' << y1 + 1 << ' ' << x2 + 1 << ' ' << y2 + 1 << '\n';
    cout.flush();
    exit(0);
}

int find_in_col(int col) {
    int l = -1, r = n - 1;
    while (r - l > 1) {
        int m = (l + r) / 2;
        int x = get(0, col, m, col);
        if (x % 2) {
            r = m;
        } else {
            l = m;
        }
    }
    return r;
}

int find_in_row(int row) {
    int l = -1, r = n - 1;
    while (r - l > 1) {
        int m = (l + r) / 2;
        int x = get(row, 0, row, m);
        if (x % 2) {
            r = m;
        } else {
            l = m;
        }
    }
    return r;
}

signed main() {
    cin.tie(0);
    cout.tie(0);
    ios_base :: sync_with_stdio(0);
    cin >> n;
    vector<int> cols;
    for (int i = 0, last = 0; i < n; i++) {
        int x = get(0, 0, n - 1, i);
        if (x % 2 != last % 2) {
            cols.push_back(i);
        }
        last = x;
    }
    if (cols.size() == 2) {
        int x1 = find_in_col(cols[0]);
        int x2 = find_in_col(cols[1]);
        ans(x1, cols[0], x2, cols[1]);
    }
    vector<int> rows;
    for (int i = 0, last = 0; i < n; i++) {
        int x = get(0, 0, i, n - 1);
        if (x % 2 != last % 2) {
            rows.push_back(i);
        }
        last = x;
    }
    int y1 = find_in_row(rows[0]);
    cout << y1;
    return 0;
    ans(rows[0], y1, rows[1], y1);
    return 0;
}


#include <bits/stdc++.h>

#define int long long
#define fi first
#define se second

using namespace std;

//const int MAXN = 100005;
//const int MOD = 1e9 + 7;

int n;

int get(int x1, int y1, int x2, int y2) {
    cout << '?' << ' ' << x1 + 1 << ' ' << y1 + 1 << ' ' << x2 + 1 << ' ' << y2 + 1 << '\n';
    cout.flush();
    int ans;
    cin >> ans;
    if (ans == -1) {
        exit(0);
    }
    return ans;
}

int ans(int x1, int y1, int x2, int y2) {
    cout << '!' << ' ' << x1 + 1 << ' ' << y1 + 1 << ' ' << x2 + 1 << ' ' << y2 + 1 << '\n';
    cout.flush();
    exit(0);
}

int find_in_col(int col) {
    int l = -1, r = n - 1;
    while (r - l > 1) {
        int m = (l + r) / 2;
        int x = get(0, col, m, col);
        if (x % 2) {
            r = m;
        } else {
            l = m;
        }
    }
    return r;
}

int find_in_row(int row) {
    int l = -1, r = n - 1;
    while (r - l > 1) {
        int m = (l + r) / 2;
        int x = get(row, 0, row, m);
        if (x % 2) {
            r = m;
        } else {
            l = m;
        }
    }
    return r;
}

signed main() {
    cin.tie(0);
    cout.tie(0);
    ios_base :: sync_with_stdio(0);
    cin >> n;
    vector<int> cols;
    for (int i = 0, last = 0; i < n; i++) {
        int x = get(0, 0, n - 1, i);
        if (x % 2 != last % 2) {
            cols.push_back(i);
        }
        last = x;
    }
    if (cols.size() == 2) {
        int x1 = find_in_col(cols[0]);
        int x2 = find_in_col(cols[1]);
        ans(x1, cols[0], x2, cols[1]);
    }
    ans(0, 0, 1, 1);
    vector<int> rows;
    for (int i = 0, last = 0; i < n; i++) {
        int x = get(0, 0, i, n - 1);
        if (x % 2 != last % 2) {
            rows.push_back(i);
        }
        last = x;
    }
    int y1 = find_in_row(rows[0]);
    ans(rows[0], y1, rows[1], y1);
    return 0;
}


#include <bits/stdc++.h>

#define int long long
#define fi first
#define se second

using namespace std;

//const int MAXN = 100005;
//const int MOD = 1e9 + 7;

int n;

int get(int x1, int y1, int x2, int y2) {
    cout << x1 + 1 << ' ' << y1 + 1 << ' ' << x2 + 1 << ' ' << y2 + 1 << '\n';
    fflush(stdout);
    int ans;
    cin >> ans;
    if (ans == -1) {
        exit(0);
    }
    return ans;
}

int ans(int x1, int y1, int x2, int y2) {
    cout << '!' << ' ' << x1 + 1 << ' ' << y1 + 1 << ' ' << x2 + 1 << ' ' << y2 + 1 << '\n';
    fflush(stdout);
    exit(0);
}

int find_in_col(int col) {
    int l = -1, r = n - 1;
    while (r - l > 1) {
        int m = (l + r) / 2;
        int x = get(0, col, m, col);
        if (x % 2) {
            r = m;
        } else {
            l = m;
        }
    }
    return r;
}

int find_in_row(int row) {
    int l = -1, r = n - 1;
    while (r - l > 1) {
        int m = (l + r) / 2;
        int x = get(row, 0, row, m);
        if (x % 2) {
            r = m;
        } else {
            l = m;
        }
    }
    return r;
}

signed main() {
    cin.tie(0);
    cout.tie(0);
    ios_base :: sync_with_stdio(0);
    cin >> n;
    vector<int> cols;
    for (int i = 0, last = 0; i < n; i++) {
        int x = get(0, 0, n - 1, i);
        if (x % 2 != last % 2) {
            cols.push_back(i);
        }
        last = x;
    }
    if (cols.size() == 2) {
        int x1 = find_in_col(cols[0]);
        int x2 = find_in_col(cols[1]);
        ans(x1, cols[0], x2, cols[1]);
    }
    vector<int> rows;
    for (int i = 0, last = 0; i < n; i++) {
        int x = get(0, 0, i, n - 1);
        if (x % 2 != last % 2) {
            rows.push_back(i);
        }
        last = x;
    }
    int y1 = find_in_row(rows[0]);
    ans(rows[0], y1, rows[1], y1);
    return 0;
}


//#pragma GCC target ("avx2")
//#pragma GCC optimization ("Ofast")
//#pragma GCC optimization ("unroll-loops")

//#pragma comment(linker,"/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

//order_of_key(k): Number of items strictly smaller than k .
//find_by_order(k): K-th element in a set (counting from zero).
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define full(x,n) x,x+n+1
#define full(x) x.begin(),x.end()
#define finish return 0

#define putb push_back
#define f first
#define s second

//logx(a^n)=loga(a^n)/logx(a)
//logx(a*b)=logx(a)+logx(b)
//logx(y)=log(y)/log(x)
//logb(n)=loga(n)/loga(b)

#define ordered_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
#define putf push_front
#define gainb pop_back

//(a+b)^n=sum of C(n,i)*a^i*b^(n-i) 0<=i<=n
//(a-b)^n=sum of C(n,i)*a^i*b^(n-i) for even i-for odd i

#define gainf pop_front
#define len(x) (int)x.size()

// 1/b%mod=b^(m-2)%mod
// (a>>x)&1==0
// a^b=(a+b)-2(a&b)

typedef double db;
typedef long long ll;

//sum of squares n*(n+1)*(2n+1)/6
//sum of cubes [n*(n+1)/2]^2
//sum of squares for odds n*(4*n*n-1)/3
//sum of cubes for odds n*n*(2*n*n-1)

const int ary=1e5+5;
const int mod=1e9+7;
const ll inf=1e18;

using namespace std;
using namespace __gnu_pbds;
int n,v;
int get(int x,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<x<<" "<<tl<<" "<<x<<" "<<tm<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return get(x,tl,tm);
	}
	return get(x,tm+1,tr);
}
int find(int y,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<tl<<" "<<y<<" "<<tm<<" "<<y<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return find(y,tl,tm);
	}
	return find(y,tm+1,tr);
}
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	cin>>n;
	cout<<"\n";
	int x=0,y=0;
	for(int i=1;i<=n;i++){
		cout<<"? "<<i<<" "<<1<<" "<<i<<" "<<n<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	if(x&&y){
		cout<<"! "<<x<<" "<<get(x)<<" "<<y<<" "<<get(y);
	}
	else{
		for(int i=1;i<=n;i++){
			cout<<"? "<<1<<" "<<i<<" "<<n<<" "<<i<<"\n";
			cout.flush();
			cin>>v;
			if(v%2==1){
				if(!x){
					x=i;
				}
				else{
					y=i;
				}
			}
		}
		int z=find(x);
		cout<<"! "<<z<<" "<<x<<" "<<z<<" "<<y;
	}
}


//#pragma GCC target ("avx2")
//#pragma GCC optimization ("Ofast")
//#pragma GCC optimization ("unroll-loops")

//#pragma comment(linker,"/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

//order_of_key(k): Number of items strictly smaller than k .
//find_by_order(k): K-th element in a set (counting from zero).
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define full(x,n) x,x+n+1
#define full(x) x.begin(),x.end()
#define finish return 0

#define putb push_back
#define f first
#define s second

//logx(a^n)=loga(a^n)/logx(a)
//logx(a*b)=logx(a)+logx(b)
//logx(y)=log(y)/log(x)
//logb(n)=loga(n)/loga(b)

#define ordered_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
#define putf push_front
#define gainb pop_back

//(a+b)^n=sum of C(n,i)*a^i*b^(n-i) 0<=i<=n
//(a-b)^n=sum of C(n,i)*a^i*b^(n-i) for even i-for odd i

#define gainf pop_front
#define len(x) (int)x.size()

// 1/b%mod=b^(m-2)%mod
// (a>>x)&1==0
// a^b=(a+b)-2(a&b)

typedef double db;
typedef long long ll;

//sum of squares n*(n+1)*(2n+1)/6
//sum of cubes [n*(n+1)/2]^2
//sum of squares for odds n*(4*n*n-1)/3
//sum of cubes for odds n*n*(2*n*n-1)

const int ary=1e5+5;
const int mod=1e9+7;
const ll inf=1e18;

using namespace std;
using namespace __gnu_pbds;
int n,v;
int get(int x,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<x<<" "<<tl<<" "<<x<<" "<<tm<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return get(x,tl,tm);
	}
	return get(x,tm+1,tr);
}
int find(int y,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<tl<<" "<<y<<" "<<tm<<" "<<y<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return find(y,tl,tm);
	}
	return find(y,tm+1,tr);
}
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	cin>>n;
	cout<<"\n";
	cout.flush();
	int x=0,y=0;
	for(int i=1;i<=n;i++){
		cout<<"? "<<i<<" "<<1<<" "<<i<<" "<<n<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	if(x&&y){
		cout<<"! "<<x<<" "<<get(x)<<" "<<y<<" "<<get(y)<<"\n";
		cout.flush();
	}
	else{
		for(int i=1;i<=n;i++){
			cout<<"? "<<1<<" "<<i<<" "<<n<<" "<<i<<"\n";
			cout.flush();
			cin>>v;
			if(v%2==1){
				if(!x){
					x=i;
				}
				else{
					y=i;
				}
			}
		}
		int z=find(x);
		cout<<"! "<<z<<" "<<x<<" "<<z<<" "<<y<<"\n";
		cout.flush();
	}
}


//#pragma GCC target ("avx2")
//#pragma GCC optimization ("Ofast")
//#pragma GCC optimization ("unroll-loops")

//#pragma comment(linker,"/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

//order_of_key(k): Number of items strictly smaller than k .
//find_by_order(k): K-th element in a set (counting from zero).
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define full(x,n) x,x+n+1
#define full(x) x.begin(),x.end()
#define finish return 0

#define putb push_back
#define f first
#define s second

//logx(a^n)=loga(a^n)/logx(a)
//logx(a*b)=logx(a)+logx(b)
//logx(y)=log(y)/log(x)
//logb(n)=loga(n)/loga(b)

#define ordered_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
#define putf push_front
#define gainb pop_back

//(a+b)^n=sum of C(n,i)*a^i*b^(n-i) 0<=i<=n
//(a-b)^n=sum of C(n,i)*a^i*b^(n-i) for even i-for odd i

#define gainf pop_front
#define len(x) (int)x.size()

// 1/b%mod=b^(m-2)%mod
// (a>>x)&1==0
// a^b=(a+b)-2(a&b)

typedef double db;
typedef long long ll;

//sum of squares n*(n+1)*(2n+1)/6
//sum of cubes [n*(n+1)/2]^2
//sum of squares for odds n*(4*n*n-1)/3
//sum of cubes for odds n*n*(2*n*n-1)

const int ary=1e5+5;
const int mod=1e9+7;
const ll inf=1e18;

using namespace std;
using namespace __gnu_pbds;
int n,v;
int get(int x,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<x<<" "<<tl<<" "<<x<<" "<<tm<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return get(x,tl,tm);
	}
	return get(x,tm+1,tr);
}
int find(int y,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<tl<<" "<<y<<" "<<tm<<" "<<y<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return find(y,tl,tm);
	}
	return find(y,tm+1,tr);
}
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	cin>>n;
	int x=0,y=0;
	for(int i=1;i<=n;i++){
		cout<<"? "<<i<<" "<<1<<" "<<i<<" "<<n<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	if(x&&y){
		cout<<"! "<<x<<" "<<get(x)<<" "<<y<<" "<<get(y);
		return 0;
	}
	for(int i=1;i<=n;i++){
		cout<<"? "<<1<<" "<<i<<" "<<n<<" "<<i<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	int z=find(x);
	cout<<"! "<<z<<" "<<x<<" "<<z<<" "<<y;
	return 0;
}


//#pragma GCC target ("avx2")
//#pragma GCC optimization ("Ofast")
//#pragma GCC optimization ("unroll-loops")

//#pragma comment(linker,"/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

//order_of_key(k): Number of items strictly smaller than k .
//find_by_order(k): K-th element in a set (counting from zero).
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define full(x,n) x,x+n+1
#define full(x) x.begin(),x.end()
#define finish return 0

#define putb push_back
#define f first
#define s second

//logx(a^n)=loga(a^n)/logx(a)
//logx(a*b)=logx(a)+logx(b)
//logx(y)=log(y)/log(x)
//logb(n)=loga(n)/loga(b)

#define ordered_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
#define putf push_front
#define gainb pop_back

//(a+b)^n=sum of C(n,i)*a^i*b^(n-i) 0<=i<=n
//(a-b)^n=sum of C(n,i)*a^i*b^(n-i) for even i-for odd i

#define gainf pop_front
#define len(x) (int)x.size()

// 1/b%mod=b^(m-2)%mod
// (a>>x)&1==0
// a^b=(a+b)-2(a&b)

typedef double db;
typedef long long ll;

//sum of squares n*(n+1)*(2n+1)/6
//sum of cubes [n*(n+1)/2]^2
//sum of squares for odds n*(4*n*n-1)/3
//sum of cubes for odds n*n*(2*n*n-1)

const int ary=1e5+5;
const int mod=1e9+7;
const ll inf=1e18;

using namespace std;
using namespace __gnu_pbds;
int n,v;
int get(int x,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<x<<" "<<tl<<" "<<x<<" "<<tm<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return get(x,tl,tm);
	}
	return get(x,tm+1,tr);
}
int find(int y,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<tl<<" "<<y<<" "<<tm<<" "<<y<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return find(y,tl,tm);
	}
	return find(y,tm+1,tr);
}
int main(){
	//ios_base::sync_with_stdio(0);
//	cin.tie(0);cout.tie(0);
	cin>>n;
	int x=0,y=0;
	for(int i=1;i<=n;i++){
		cout<<"? "<<i<<" "<<1<<" "<<i<<" "<<n<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	if(x&&y){
		cout<<"! "<<x<<" "<<get(x)<<" "<<y<<" "<<get(y);
		cout.flush();
		return 0;
	}
	for(int i=1;i<=n;i++){
		cout<<"? "<<1<<" "<<i<<" "<<n<<" "<<i<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	int z=find(x);
	cout<<"! "<<z<<" "<<x<<" "<<z<<" "<<y;
	cout.flush();
	return 0;
}


//#pragma GCC target ("avx2")
//#pragma GCC optimization ("Ofast")
//#pragma GCC optimization ("unroll-loops")

//#pragma comment(linker,"/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

//order_of_key(k): Number of items strictly smaller than k .
//find_by_order(k): K-th element in a set (counting from zero).
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define full(x,n) x,x+n+1
#define full(x) x.begin(),x.end()
#define finish return 0

#define putb push_back
#define f first
#define s second

//logx(a^n)=loga(a^n)/logx(a)
//logx(a*b)=logx(a)+logx(b)
//logx(y)=log(y)/log(x)
//logb(n)=loga(n)/loga(b)

#define ordered_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
#define putf push_front
#define gainb pop_back

//(a+b)^n=sum of C(n,i)*a^i*b^(n-i) 0<=i<=n
//(a-b)^n=sum of C(n,i)*a^i*b^(n-i) for even i-for odd i

#define gainf pop_front
#define len(x) (int)x.size()

// 1/b%mod=b^(m-2)%mod
// (a>>x)&1==0
// a^b=(a+b)-2(a&b)

typedef double db;
typedef long long ll;

//sum of squares n*(n+1)*(2n+1)/6
//sum of cubes [n*(n+1)/2]^2
//sum of squares for odds n*(4*n*n-1)/3
//sum of cubes for odds n*n*(2*n*n-1)

const int ary=1e5+5;
const int mod=1e9+7;
const ll inf=1e18;

using namespace std;
using namespace __gnu_pbds;
int n,v;
int get(int x,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<x<<" "<<tl<<" "<<x<<" "<<tm<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return get(x,tl,tm);
	}
	return get(x,tm+1,tr);
}
int find(int y,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<tl<<" "<<y<<" "<<tm<<" "<<y<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return find(y,tl,tm);
	}
	return find(y,tm+1,tr);
}
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	cin>>n;
	int x=0,y=0;
	for(int i=1;i<=n;i++){
		cout<<"? "<<i<<" "<<1<<" "<<i<<" "<<n<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	if(x&&y){
		cout<<"! "<<x<<" "<<get(x)<<" "<<y<<" "<<get(y)<<"\n";
		cout.flush();
		return 0;
	}
	for(int i=1;i<=n;i++){
		cout<<"? "<<1<<" "<<i<<" "<<n<<" "<<i<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	int z=find(x);
	cout<<"! "<<z<<" "<<x<<" "<<z<<" "<<y<<"\n";
	cout.flush();
	return 0;
}


//#pragma GCC target ("avx2")
//#pragma GCC optimization ("Ofast")
//#pragma GCC optimization ("unroll-loops")

//#pragma comment(linker,"/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

//order_of_key(k): Number of items strictly smaller than k .
//find_by_order(k): K-th element in a set (counting from zero).
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define full(x,n) x,x+n+1
#define full(x) x.begin(),x.end()
#define finish return 0

#define putb push_back
#define f first
#define s second

//logx(a^n)=loga(a^n)/logx(a)
//logx(a*b)=logx(a)+logx(b)
//logx(y)=log(y)/log(x)
//logb(n)=loga(n)/loga(b)

#define ordered_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
#define putf push_front
#define gainb pop_back

//(a+b)^n=sum of C(n,i)*a^i*b^(n-i) 0<=i<=n
//(a-b)^n=sum of C(n,i)*a^i*b^(n-i) for even i-for odd i

#define gainf pop_front
#define len(x) (int)x.size()

// 1/b%mod=b^(m-2)%mod
// (a>>x)&1==0
// a^b=(a+b)-2(a&b)

typedef double db;
typedef long long ll;

//sum of squares n*(n+1)*(2n+1)/6
//sum of cubes [n*(n+1)/2]^2
//sum of squares for odds n*(4*n*n-1)/3
//sum of cubes for odds n*n*(2*n*n-1)

const int ary=1e5+5;
const int mod=1e9+7;
const ll inf=1e18;

using namespace std;
using namespace __gnu_pbds;
int n,v;
int get(int x,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<x<<" "<<tl<<" "<<x<<" "<<tm<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return get(x,tl,tm);
	}
	return get(x,tm+1,tr);
}
int find(int y,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<tl<<" "<<y<<" "<<tm<<" "<<y<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return find(y,tl,tm);
	}
	return find(y,tm+1,tr);
}
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	cin>>n;
	cout<<"\n";
	int x=0,y=0;
	for(int i=1;i<=n;i++){
		cout<<"? "<<i<<" "<<1<<" "<<i<<" "<<n<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	if(x&&y){
		cout<<"! "<<x<<" "<<get(x)<<" "<<y<<" "<<get(y)<<"\n";
		cout.flush();
	}
	else{
		for(int i=1;i<=n;i++){
			cout<<"? "<<1<<" "<<i<<" "<<n<<" "<<i<<"\n";
			cout.flush();
			cin>>v;
			if(v%2==1){
				if(!x){
					x=i;
				}
				else{
					y=i;
				}
			}
		}
		int z=find(x);
		cout<<"! "<<z<<" "<<x<<" "<<z<<" "<<y<<"\n";
		cout.flush();
	}
}


//#pragma GCC target ("avx2")
//#pragma GCC optimization ("Ofast")
//#pragma GCC optimization ("unroll-loops")

//#pragma comment(linker,"/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

//order_of_key(k): Number of items strictly smaller than k .
//find_by_order(k): K-th element in a set (counting from zero).
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define full(x,n) x,x+n+1
#define full(x) x.begin(),x.end()
#define finish return 0

#define putb push_back
#define f first
#define s second

//logx(a^n)=loga(a^n)/logx(a)
//logx(a*b)=logx(a)+logx(b)
//logx(y)=log(y)/log(x)
//logb(n)=loga(n)/loga(b)

#define ordered_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
#define putf push_front
#define gainb pop_back

//(a+b)^n=sum of C(n,i)*a^i*b^(n-i) 0<=i<=n
//(a-b)^n=sum of C(n,i)*a^i*b^(n-i) for even i-for odd i

#define gainf pop_front
#define len(x) (int)x.size()

// 1/b%mod=b^(m-2)%mod
// (a>>x)&1==0
// a^b=(a+b)-2(a&b)

typedef double db;
typedef long long ll;

//sum of squares n*(n+1)*(2n+1)/6
//sum of cubes [n*(n+1)/2]^2
//sum of squares for odds n*(4*n*n-1)/3
//sum of cubes for odds n*n*(2*n*n-1)

const int ary=1e5+5;
const int mod=1e9+7;
const ll inf=1e18;

using namespace std;
using namespace __gnu_pbds;
int n,v;
int get(int x,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<x<<" "<<tl<<" "<<x<<" "<<tm<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return get(x,tl,tm);
	}
	return get(x,tm+1,tr);
}
int find(int y,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<tl<<" "<<y<<" "<<tm<<" "<<y<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return find(y,tl,tm);
	}
	return find(y,tm+1,tr);
}
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	cin>>n;
	cout<<"\n";
	cout.flush();
	int x=0,y=0;
	for(int i=1;i<=n;i++){
		cout<<"? "<<i<<" "<<1<<" "<<i<<" "<<n<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	if(x&&y){
		int z=get(x);
		int r=get(y);
		cout<<"! "<<x<<" "<<z<<" "<<y<<" "<<r;
	}
	else{
		for(int i=1;i<=n;i++){
			cout<<"? "<<1<<" "<<i<<" "<<n<<" "<<i<<"\n";
			cout.flush();
			cin>>v;
			if(v%2==1){
				if(!x){
					x=i;
				}
				else{
					y=i;
				}
			}
		}
		int z=find(x);
		cout<<"! "<<z<<" "<<x<<" "<<z<<" "<<y;
	}
}


//#pragma GCC target ("avx2")
//#pragma GCC optimization ("Ofast")
//#pragma GCC optimization ("unroll-loops")

//#pragma comment(linker,"/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

//order_of_key(k): Number of items strictly smaller than k .
//find_by_order(k): K-th element in a set (counting from zero).
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define full(x,n) x,x+n+1
#define full(x) x.begin(),x.end()
#define finish return 0

#define putb push_back
#define f first
#define s second

//logx(a^n)=loga(a^n)/logx(a)
//logx(a*b)=logx(a)+logx(b)
//logx(y)=log(y)/log(x)
//logb(n)=loga(n)/loga(b)

#define ordered_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
#define putf push_front
#define gainb pop_back

//(a+b)^n=sum of C(n,i)*a^i*b^(n-i) 0<=i<=n
//(a-b)^n=sum of C(n,i)*a^i*b^(n-i) for even i-for odd i

#define gainf pop_front
#define len(x) (int)x.size()

// 1/b%mod=b^(m-2)%mod
// (a>>x)&1==0
// a^b=(a+b)-2(a&b)

typedef double db;
typedef long long ll;

//sum of squares n*(n+1)*(2n+1)/6
//sum of cubes [n*(n+1)/2]^2
//sum of squares for odds n*(4*n*n-1)/3
//sum of cubes for odds n*n*(2*n*n-1)

const int ary=1e5+5;
const int mod=1e9+7;
const ll inf=1e18;

using namespace std;
using namespace __gnu_pbds;
int n,v;
int get(int x,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<x<<" "<<tl<<" "<<x<<" "<<tm<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return get(x,tl,tm);
	}
	return get(x,tm+1,tr);
}
int find(int y,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<tl<<" "<<y<<" "<<tm<<" "<<y<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return find(y,tl,tm);
	}
	return find(y,tm+1,tr);
}
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	cin>>n;
	int x=0,y=0;
	for(int i=1;i<=n;i++){
		cout<<"? "<<i<<" "<<1<<" "<<i<<" "<<n<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	if(x&&y){
		cout<<"! "<<x<<" "<<get(x)<<" "<<y<<" "<<get(y)<<"\n";
		return 0;
	}
	for(int i=1;i<=n;i++){
		cout<<"? "<<1<<" "<<i<<" "<<n<<" "<<i<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	int z=find(x);
	cout<<"! "<<z<<" "<<x<<" "<<z<<" "<<y<<"\n";
	return 0;
}


//#pragma GCC target ("avx2")
//#pragma GCC optimization ("Ofast")
//#pragma GCC optimization ("unroll-loops")

//#pragma comment(linker,"/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

//order_of_key(k): Number of items strictly smaller than k .
//find_by_order(k): K-th element in a set (counting from zero).
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define full(x,n) x,x+n+1
#define full(x) x.begin(),x.end()
#define finish return 0

#define putb push_back
#define f first
#define s second

//logx(a^n)=loga(a^n)/logx(a)
//logx(a*b)=logx(a)+logx(b)
//logx(y)=log(y)/log(x)
//logb(n)=loga(n)/loga(b)

#define ordered_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
#define putf push_front
#define gainb pop_back

//(a+b)^n=sum of C(n,i)*a^i*b^(n-i) 0<=i<=n
//(a-b)^n=sum of C(n,i)*a^i*b^(n-i) for even i-for odd i

#define gainf pop_front
#define len(x) (int)x.size()

// 1/b%mod=b^(m-2)%mod
// (a>>x)&1==0
// a^b=(a+b)-2(a&b)

typedef double db;
typedef long long ll;

//sum of squares n*(n+1)*(2n+1)/6
//sum of cubes [n*(n+1)/2]^2
//sum of squares for odds n*(4*n*n-1)/3
//sum of cubes for odds n*n*(2*n*n-1)

const int ary=1e5+5;
const int mod=1e9+7;
const ll inf=1e18;

using namespace std;
using namespace __gnu_pbds;
int n,v;
int get(int x,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<x<<" "<<tl<<" "<<x<<" "<<tm<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return get(x,tl,tm);
	}
	return get(x,tm+1,tr);
}
int find(int y,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<tl<<" "<<y<<" "<<tm<<" "<<y<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return find(y,tl,tm);
	}
	return find(y,tm+1,tr);
}
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	cin>>n;
	int x=0,y=0;
	for(int i=1;i<=n;i++){
		cout<<"? "<<i<<" "<<1<<" "<<i<<" "<<n<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	if(x&&y){
		cout<<"! "<<x<<" "<<get(x)<<" "<<y<<" "<<get(y);
		cout.flush();
		return 0;
	}
	for(int i=1;i<=n;i++){
		cout<<"? "<<1<<" "<<i<<" "<<n<<" "<<i<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	int z=find(x);
	cout<<"! "<<z<<" "<<x<<" "<<z<<" "<<y;
	cout.flush();
	return 0;
}


//#pragma GCC target ("avx2")
//#pragma GCC optimization ("Ofast")
//#pragma GCC optimization ("unroll-loops")

//#pragma comment(linker,"/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

//order_of_key(k): Number of items strictly smaller than k .
//find_by_order(k): K-th element in a set (counting from zero).
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define full(x,n) x,x+n+1
#define full(x) x.begin(),x.end()
#define finish return 0

#define putb push_back
#define f first
#define s second

//logx(a^n)=loga(a^n)/logx(a)
//logx(a*b)=logx(a)+logx(b)
//logx(y)=log(y)/log(x)
//logb(n)=loga(n)/loga(b)

#define ordered_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
#define putf push_front
#define gainb pop_back

//(a+b)^n=sum of C(n,i)*a^i*b^(n-i) 0<=i<=n
//(a-b)^n=sum of C(n,i)*a^i*b^(n-i) for even i-for odd i

#define gainf pop_front
#define len(x) (int)x.size()

// 1/b%mod=b^(m-2)%mod
// (a>>x)&1==0
// a^b=(a+b)-2(a&b)

typedef double db;
typedef long long ll;

//sum of squares n*(n+1)*(2n+1)/6
//sum of cubes [n*(n+1)/2]^2
//sum of squares for odds n*(4*n*n-1)/3
//sum of cubes for odds n*n*(2*n*n-1)

const int ary=1e5+5;
const int mod=1e9+7;
const ll inf=1e18;

using namespace std;
using namespace __gnu_pbds;
int n,v;
int get(int x,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<x<<" "<<tl<<" "<<x<<" "<<tm<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return get(x,tl,tm);
	}
	return get(x,tm+1,tr);
}
int find(int y,int tl=1,int tr=n){
	if(tl==tr){
		return tl;
	}
	int tm=(tl+tr)/2;
	cout<<"? "<<tl<<" "<<y<<" "<<tm<<" "<<y<<"\n";
	cout.flush();
	cin>>v;
	if(v%2){
		return find(y,tl,tm);
	}
	return find(y,tm+1,tr);
}
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	cin>>n;
	int x=0,y=0;
	for(int i=1;i<=n;i++){
		cout<<"? "<<i<<" "<<1<<" "<<i<<" "<<n<<"\n";
		cout.flush();
		cin>>v;
		if(v%2==1){
			if(!x){
				x=i;
			}
			else{
				y=i;
			}
		}
	}
	if(x&&y){
		cout<<"! "<<x<<" "<<get(x)<<" "<<y<<" "<<get(y);
	}
	else{
		for(int i=1;i<=n;i++){
			cout<<"? "<<1<<" "<<i<<" "<<n<<" "<<i<<"\n";
			cout.flush();
			cin>>v;
			if(v%2==1){
				if(!x){
					x=i;
				}
				else{
					y=i;
				}
			}
		}
		int z=find(x);
		cout<<"! "<<z<<" "<<x<<" "<<z<<" "<<y;
	}
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    scanf ("%d",&n);
    int answer;
    int firstcolumn=-1;
    int secondcolumn=-1;
    int firstrow=-1;
    int secondrow=-1;
    for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",i,1,i,n);
        fflush(stdout);
        scanf ("%d",&answer);
        if (answer%2==1){
            if (firstcolumn==-1){
                firstcolumn=i;
            }
            else{
                secondcolumn=i;
            }
        }
    }
    if (firstcolumn!=-1){
        int low=1;
        int mid;
        int high=n;
        while(){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",firstcolumn,low,firstcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstrow=low;
        low=1;
        high=n;
        while(){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",secondcolumn,low,secondcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        secondrow=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,secondcolumn,secondrow);
        fflush(stdout);
    }
    else{
        for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",1,i,n,i);
        fflush(stdout);
        scanf ("%d",&answer);
            if (answer%2==1){
                if (firstrow==-1){
                    firstrow=i;
                }
                else{
                    secondrow=i;
                }
            }
        }
        int low=1;
        int mid;
        int high=n;
        while(){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",low,firstrow,mid,firstrow);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstcolumn=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,firstcolumn,secondrow);
        fflush(stdout);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    scanf ("%d",&n);
    int answer;
    int firstcolumn=-1;
    int secondcolumn=-1;
    int firstrow=-1;
    int secondrow=-1;
    for (int i=1; i<=1000; i++){
        printf("? %d %d %d %d\n",i,1,i,1000);
        fflush(stdout);
        scanf ("%d",&answer);
        if (answer%2==1){
            if (firstcolumn==-1){
                firstcolumn=i;
            }
            else{
                secondcolumn=i;
            }
        }
    }
    if (firstcolumn!=-1){
        int low=1;
        int mid;
        int high=n;
        while(low<high){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",firstcolumn,low,firstcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstrow=low;
        low=1;
        high=n;
        while(low<high){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",secondcolumn,low,secondcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        secondrow=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,secondcolumn,secondrow);
        fflush(stdout);
    }
    else{
        for (int i=1; i<=1000; i++){
        printf("? %d %d %d %d\n",1,i,1000,i);
        fflush(stdout);
        scanf ("%d",&answer);
            if (answer%2==1){
                if (firstrow==-1){
                    firstrow=i;
                }
                else{
                    secondrow=i;
                }
            }
        }
        int low=1;
        int mid;
        int high=n;
        while(low<high){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",low,firstrow,mid,firstrow);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstcolumn=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,firstcolumn,secondrow);
        fflush(stdout);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    scanf ("%d",&n);
    int answer;
    int firstcolumn=-1;
    int secondcolumn=-1;
    int firstrow=-1;
    int secondrow=-1;
    for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",i,1,i,n);
        fflush(stdout);
        scanf ("%d",&answer);
        if (answer%2==1){
            if (firstcolumn==-1){
                firstcolumn=i;
            }
            else{
                secondcolumn=i;
            }
        }
    }
    if (firstcolumn!=-1){
        int low=1;
        int mid;
        int high=n;
        while(low!=mid){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",firstcolumn,low,firstcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstrow=low;
        low=1;
        high=n;
        while(low!=mid){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",secondcolumn,low,secondcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        secondrow=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,secondcolumn,secondrow);
        fflush(stdout);
    }
    else{
        for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",1,i,n,i);
        fflush(stdout);
        scanf ("%d",&answer);
            if (answer%2==1){
                if (firstrow==-1){
                    firstrow=i;
                }
                else{
                    secondrow=i;
                }
            }
        }
        int low=1;
        int mid;
        int high=n;
        while(low!=mid){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",low,firstrow,mid,firstrow);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstcolumn=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,firstcolumn,secondrow);
        fflush(stdout);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    scanf ("%d",&n);
    int answer;
    int firstcolumn=-1;
    int secondcolumn=-1;
    int firstrow=-1;
    int secondrow=-1;
    for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",i,1,i,n);
        fflush(stdout);
        scanf ("%d",&answer);
        if (answer%2==1){
            if (firstcolumn==-1){
                firstcolumn=i;
            }
            else{
                secondcolumn=i;
            }
        }
    }
    if (firstcolumn!=-1){
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",firstcolumn,low,firstcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid;
            }
            else{
                low=mid+1;
            }
        }
        firstrow=low;
        low=1;
        high=n;
        while(true){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",secondcolumn,low,secondcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid;
            }
            else{
                low=mid+1;
            }
        }
        secondrow=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,secondcolumn,secondrow);
        fflush(stdout);
    }
    else{
        for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",1,i,n,i);
        fflush(stdout);
        scanf ("%d",&answer);
            if (answer%2==1){
                if (firstrow==-1){
                    firstrow=i;
                }
                else{
                    secondrow=i;
                }
            }
        }
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",low,firstrow,mid,firstrow);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid;
            }
            else{
                low=mid+1;
            }
        }
        firstcolumn=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,firstcolumn,secondrow);
        fflush(stdout);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    scanf ("%d",&n);
    int answer;
    int firstcolumn=-1;
    int secondcolumn=-1;
    int firstrow=-1;
    int secondrow=-1;
    for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",i,1,i,n);
        fflush(stdout);
        scanf ("%d",&answer);
        if (answer%2==1){
            if (firstcolumn==-1){
                firstcolumn=i;
            }
            else{
                secondcolumn=i;
            }
        }
    }
    if (firstcolumn!=-1){
        int low=1;
        int mid;
        int high=n;
        while(low<high){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",firstcolumn,low,firstcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstrow=low;
        low=1;
        high=n;
        while(low<high){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",secondcolumn,low,secondcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        secondrow=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,secondcolumn,secondrow);
        fflush(stdout);
    }
    else{
        for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",1,i,n,i);
        fflush(stdout);
        scanf ("%d",&answer);
            if (answer%2==1){
                if (firstrow==-1){
                    firstrow=i;
                }
                else{
                    secondrow=i;
                }
            }
        }
        int low=1;
        int mid;
        int high=n;
        while(low<high){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",low,firstrow,mid,firstrow);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstcolumn=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,firstcolumn,secondrow);
        fflush(stdout);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    scanf ("%d",&n);
    int answer;
    int firstcolumn=-1;
    int secondcolumn=-1;
    int firstrow=-1;
    int secondrow=-1;
    for (int i=1; i<n; i++){
        printf("? %d %d %d %d\n",i,1,i,n);
        fflush(stdout);
        scanf ("%d",&answer);
        if (answer%2==1){
            if (firstcolumn==-1){
                firstcolumn=i;
            }
            else{
                secondcolumn=i;
            }
        }
    }
    if (firstcolumn!=-1){
        if (secondcolumn==-1){
            secondcolumn=n;
        }
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",firstcolumn,low,firstcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid;
            }
            else{
                low=mid+1;
            }
        }
        firstrow=low;
        low=1;
        high=n;
        while(true){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",secondcolumn,low,secondcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid;
            }
            else{
                low=mid+1;
            }
        }
        secondrow=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,secondcolumn,secondrow);
        fflush(stdout);
    }
    else{
        for (int i=1; i<n; i++){
        printf("? %d %d %d %d\n",1,i,n,i);
        fflush(stdout);
        scanf ("%d",&answer);
            if (answer%2==1){
                if (firstrow==-1){
                    firstrow=i;
                }
                else{
                    secondrow=i;
                }
            }
        }
        if (secondrow==-1){
            secondrow=n;
        }
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",low,firstrow,mid,firstrow);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid;
            }
            else{
                low=mid+1;
            }
        }
        firstcolumn=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,firstcolumn,secondrow);
        fflush(stdout);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    scanf ("%d",&n);
    int answer;
    int firstcolumn=-1;
    int secondcolumn=-1;
    int firstrow=-1;
    int secondrow=-1;
    for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",i,1,i,n);
        fflush(stdout);
        scanf ("%d",&answer);
        if (answer%2==1){
            if (firstcolumn==-1){
                firstcolumn=i;
            }
            else{
                secondcolumn=i;
            }
        }
    }
    if (firstcolumn!=-1){
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",firstcolumn,low,firstcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstrow=low;
        low=1;
        high=n;
        while(true){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",secondcolumn,low,secondcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        secondrow=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,secondcolumn,secondrow);
        fflush(stdout);
    }
    else{
        for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",1,i,n,i);
        fflush(stdout);
        scanf ("%d",&answer);
            if (answer%2==1){
                if (firstrow==-1){
                    firstrow=i;
                }
                else{
                    secondrow=i;
                }
            }
        }
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",low,firstrow,mid,firstrow);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstcolumn=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,firstcolumn,secondrow);
        fflush(stdout);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    scanf ("%d",&n);
    int answer;
    int firstcolumn=-1;
    int secondcolumn=-1;
    int firstrow=-1;
    int secondrow=-1;
    for (int i=1; i<n; i++){
        printf("? %d %d %d %d\n",i,1,i,n);
        fflush(stdout);
        scanf ("%d",&answer);
        if (answer%2==1){
            if (firstcolumn==-1){
                firstcolumn=i;
            }
            else{
                secondcolumn=i;
            }
        }
    }
    if (firstcolumn!=-1){
        if (secondcolumn==-1){
            secondcolumn=n;
        }
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",firstcolumn,low,firstcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstrow=low;
        low=1;
        high=n;
        while(true){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",secondcolumn,low,secondcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        secondrow=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,secondcolumn,secondrow);
        fflush(stdout);
    }
    else{
        for (int i=1; i<n; i++){
        printf("? %d %d %d %d\n",1,i,n,i);
        fflush(stdout);
        scanf ("%d",&answer);
            if (answer%2==1){
                if (firstrow==-1){
                    firstrow=i;
                }
                else{
                    secondrow=i;
                }
            }
        }
        if (secondrow==-1){
            secondrow=n;
        }
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",low,firstrow,mid,firstrow);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstcolumn=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,firstcolumn,secondrow);
        fflush(stdout);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    scanf ("%d",&n);
    int answer;
    int firstcolumn=-1;
    int secondcolumn=-1;
    int firstrow=-1;
    int secondrow=-1;
    for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",i,1,i,n);
        fflush(stdout);
        scanf ("%d",&answer);
        if (answer%2==1){
            if (firstcolumn==-1){
                firstcolumn=i;
            }
            else{
                secondcolumn=i;
            }
        }
    }
    if (firstcolumn!=-1){
        int low=1;
        int mid;
        int high=n;
        while(low!=high){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",firstcolumn,low,firstcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstrow=low;
        low=1;
        high=n;
        while(low!=high){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",secondcolumn,low,secondcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        secondrow=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,secondcolumn,secondrow);
        fflush(stdout);
    }
    else{
        for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",1,i,n,i);
        fflush(stdout);
        scanf ("%d",&answer);
            if (answer%2==1){
                if (firstrow==-1){
                    firstrow=i;
                }
                else{
                    secondrow=i;
                }
            }
        }
        int low=1;
        int mid;
        int high=n;
        while(low!=high){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",low,firstrow,mid,firstrow);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstcolumn=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,firstcolumn,secondrow);
        fflush(stdout);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    scanf ("%d",&n);
    int answer;
    int firstcolumn=-1;
    int secondcolumn=-1;
    int firstrow=-1;
    int secondrow=-1;
    for (int i=1; i<n; i++){
        printf("? %d %d %d %d\n",i,1,i,n);
        fflush(stdout);
        scanf ("%d",&answer);
        if (answer%2==1){
            if (firstcolumn==-1){
                firstcolumn=i;
            }
            else{
                secondcolumn=i;
            }
        }
    }
    if (firstcolumn!=-1){
        if (secondcolumn==-1){
            secondcolumn=n;
        }
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",firstcolumn,low,firstcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstrow=low;
        low=1;
        high=n;
        while(true){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",secondcolumn,low,secondcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        secondrow=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,secondcolumn,secondrow);
        fflush(stdout);
    }
    else{
        for (int i=1; i<n; i++){
        printf("? %d %d %d %d\n",1,i,n,i);
        fflush(stdout);
        scanf ("%d",&answer);
            if (answer%2==1){
                if (firstrow==-1){
                    firstrow=i;
                }
                else{
                    secondrow=i;
                }
            }
        }
        if (secondrow==-1){
            secondrow=n;
        }
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            printf("? %d %d %d %d\n",low,firstrow,mid,firstrow);
            fflush(stdout);
            scanf ("%d",&answer);
            if (mid==low){
                if (answer%2==0){
                    low=mid+1;
                }
                break;
            }
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstcolumn=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,firstcolumn,secondrow);
        fflush(stdout);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    scanf ("%d",&n);
    int answer;
    int firstcolumn=-1;
    int secondcolumn=-1;
    int firstrow=-1;
    int secondrow=-1;
    for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",i,1,i,n);
        fflush(stdout);
        scanf ("%d",&answer);
        if (answer%2==1){
            if (firstcolumn==-1){
                firstcolumn=i;
            }
            else{
                secondcolumn=i;
            }
        }
    }
    if (firstcolumn!=-1){
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",firstcolumn,low,firstcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstrow=low;
        low=1;
        high=n;
        while(true){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",secondcolumn,low,secondcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        secondrow=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,secondcolumn,secondrow);
        fflush(stdout);
    }
    else{
        for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",1,i,n,i);
        fflush(stdout);
        scanf ("%d",&answer);
            if (answer%2==1){
                if (firstrow==-1){
                    firstrow=i;
                }
                else{
                    secondrow=i;
                }
            }
        }
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",low,firstrow,mid,firstrow);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid-1;
            }
            else{
                low=mid+1;
            }
        }
        firstcolumn=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,firstcolumn,secondrow);
        fflush(stdout);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    scanf ("%d",&n);
    int answer;
    int firstcolumn=-1;
    int secondcolumn=-1;
    int firstrow=-1;
    int secondrow=-1;
    for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",i,1,i,n);
        fflush(stdout);
        scanf ("%d",&answer);
        if (answer%2==1){
            if (firstcolumn==-1){
                firstcolumn=i;
            }
            else{
                secondcolumn=i;
            }
        }
    }
    if (firstcolumn!=-1){
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",firstcolumn,low,firstcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid;
            }
            else{
                low=mid+1;
            }
        }
        firstrow=low;
        low=1;
        high=n;
        while(true){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",secondcolumn,low,secondcolumn,mid);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid;
            }
            else{
                low=mid+1;
            }
        }
        secondrow=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,secondcolumn,secondrow);
        fflush(stdout);
    }
    else{
        for (int i=1; i<=n; i++){
        printf("? %d %d %d %d\n",1,i,n,i);
        fflush(stdout);
        scanf ("%d",&answer);
            if (answer%2==1){
                if (firstrow==-1){
                    firstrow=i;
                }
                else{
                    secondrow=i;
                }
            }
        }
        int low=1;
        int mid;
        int high=n;
        while(true){
            mid=(low+high)/2;
            if (low==mid){
                break;
            }
            printf("? %d %d %d %d\n",low,firstrow,mid,firstrow);
            fflush(stdout);
            scanf ("%d",&answer);
            if (answer%2==1){
                high=mid;
            }
            else{
                low=mid+1;
            }
        }
        firstcolumn=low;
        printf("! %d %d %d %d\n",firstcolumn,firstrow,firstcolumn,secondrow);
        fflush(stdout);
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n;
int r[2], rr, c[2], cc;
const int MAX_N = 1e3 + 5;
bool used[MAX_N][MAX_N];
int ux, uy, dx, dy;
int x1, x2, y1, y2;
int a1, b1, a2, b2;

void query() {
    //
	cout << "? " << x1 << " " << y1 << " " << x2 << " " << y2 << endl;
	cout.flush();
}
void ans() {
	cout << "! " << a1 << " " << b1 << " " << a2 << " " << b2 << endl;
	cout.flush();
}

int in() {
	int s;  cin >> s;

	if (s == -1) exit(0);
	else return s;
}

int randx() {
	int k = rand() % (dx - ux+1);
	return ux + k;
}

int randy() {
	int k = rand() % (dy - uy+1);
	return uy + k;
}

int main() {
	srand((unsigned)time(NULL));
	cin >> n;
	ux = uy = 1, dx = dy = n;
	while (true) {
		int xx1 = randx(), xx2 = randx(), yy1 = randy(), yy2 = randy();
		x1 = min(xx1, xx2), x2 = max(xx1, xx2), y1 = min(yy1, yy2), y2 = max(yy1, yy2);
		query();
		int s = in();
		if (s & 1) {
			ux = x1; dx = x2;
			uy = y1, dy = y2;
		}
		if (ux == dx && uy == dy) {
			a1 = ux, b1 = uy;
			break;
		}
	}
	ux = uy = 1, dx = dy = n;
	while (true) {
		int xx1 = randx(), xx2 = randx(), yy1 = randy(), yy2 = randy();
		x1 = min(xx1, xx2), x2 = max(xx1, xx2), y1 = min(yy1, yy2), y2 = max(yy1, yy2);
		if (x1 <= a1 && a1 <= x2 && y1 <= b1 && b1 <= y2) continue;
		query();
		int s = in();
		if (s & 1) {
			ux = x1; dx = x2;
			uy = y1, dy = y2;
		}
		if (ux == dx && uy == dy) {
			a2 = ux, b2 = uy;
			break;
		}
	}
	ans();

}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    long long n, m, x, y, ans=0, zero=0;
    cin>>n>>m;
    set<int> r;
    set<int> c;
    while(m--)
    {
        cin>>x>>y;
        r.insert(x);
        c.insert(y);
        long long cont=(c.size()*n+r.size()*n)-(r.size()*c.size());
        ans=(n*n)-cont;
        cout<<max(ans, zero)<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    long long n, m, x, y, zero=0;
    cin>>n>>m;
    set<long long> r;
    set<long long> c;
    while(m--)
    {
        cin>>x>>y;
        r.insert(x);
        c.insert(y);
long long row=r.size();
long long col=c.size();
        long long ans = n * n - col*n - row*n;
        cout<<max(ans+row*col, zero)<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    long long n, m, x, y, zero=0;
    cin>>n>>m;
    set<long long> r;
    set<long long> c;
    while(m--)
    {
        cin>>x>>y;
        r.insert(x);
        c.insert(y);
        long long ans = n * n - c.size()*n - r.size()*n;
        cout<<max(ans+r.size()*c.size(), zero)<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    long long n, m, x, y, ans=0;
    cin>>n>>m;
    set<int> r;
    set<int> c;
    while(m--)
    {
        cin>>x>>y;
        r.insert(x);
        c.insert(y);
        long long cont=(c.size()*n+r.size()*n)-(r.size()*c.size());
        ans=(n*n)-cont;
        cout<<max(ans, 0)<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    long long n, m, x, y, ans=0;
    cin>>n>>m;
    set<int> r;
    set<int> c;
    while(m--)
    {
        cin>>x>>y;
        r.insert(x);
        c.insert(y);
        long long cont=(c.size()*n+r.size()*n)-(r.size()*c.size());
        ans=(n*n)-cont;
        cout<<ans<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n, m, x, y, ans=0;
    cin>>n>>m;
    set<int> r;
    set<int> c;
    while(m--)
    {
        cin>>x>>y;
        r.insert(x);
        c.insert(y);
        int cont=(c.size()*n+r.size()*n)-(r.size()*c.size());
        ans=(n*n)-cont;
        cout<<ans<<" ";
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define dl endl
#define f first
#define s second
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define vc vector<ll>
#define pr pair<ll,ll>
using namespace std;
const int N = 200000+9;
ll n,x,r,c;
map<int,bool>viscl,visro;
int ro=0,cl=0;
/*void DFS(int node=1,int bo=0)
{
   vis[node]=bo;
   for(auto h: vv[node])
   {
       if(vis[h]!=-1)
       {
          DFS(h,!bo);
       }
   }
}

*/
int main()
{
ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 cin>>n>>x;
 ll ans=n*n;
 vc vv;
 while(x--)
 {
    cin>>r>>c;
    if(!visro[r]&&!viscl[c])
    {
      visro[r]=1;
      viscl[c]=1;
      ans-=(n-ro-1)+(n-cl-1)+1;
      vv.pb(ans);
      ro++,cl++;
    }
    else if(!visro[r]&&viscl[c])
    {
        ans-=(n-cl);
        visro[r]=1;
        ro++;
        vv.pb(ans);
    }
    else
    {
        ans-=(n-ro);
        viscl[c]=1;
        cl++;
        vv.pb(ans);
    }

 }
 for(auto h : vv){cout<<h<<" ";}

}


#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define dl endl
#define f first
#define s second
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define vc vector<ll>
#define pr pair<ll,ll>
#define f(i,x,n) for (int i = x;i < n;++i)
using namespace std;
const int N = 200000+9;
ll n,x,r,c;
map<int,bool>viscl,visro;
int ro=0,cl=0;
/*void DFS(int node=1,int bo=0)
{
   vis[node]=bo;
   for(auto h: vv[node])
   {
       if(vis[h]!=-1)
       {
          DFS(h,!bo);
       }
   }
}

*/
int main()
{
ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 cin>>n>>x;
 ll ans=n*n;
 vc vv;
 while(x--)
 {
    cin>>r>>c;
    if(!visro[r]&&!viscl[c])
    {
      visro[r]=1;
      viscl[c]=1;
      ans-=(n-ro-1)+(n-cl-1)+1;
      ro++,cl++;
    }
    else if(!visro[r]&&viscl[c])
    {
        ans-=(n-cl);
        visro[r]=1;
        ro++;

    }
    else if(visro[r]&&!viscl[c])
    {
        ans-=(n-ro);
        viscl[c]=1;
        cl++;

    }
    vv.pb(ans);

 }
 for(auto h : vv){cout<<h<<" ";}

}


#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define dl endl
#define f first
#define s second
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define vc vector<ll>
#define pr pair<ll,ll>
using namespace std;
const int N = 200000+9;
ll n,x,r,c;
map<int,bool>viscl,visro;
int ro=0,cl=0;
/*void DFS(int node=1,int bo=0)
{
   vis[node]=bo;
   for(auto h: vv[node])
   {
       if(vis[h]!=-1)
       {
          DFS(h,!bo);
       }
   }
}

*/
int main()
{
ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 cin>>n>>x;
 ll ans=n*n;
 vc vv;
 while(x--)
 {
    cin>>r>>c;
    if(!visro[r]&&!viscl[c])
    {
      visro[r]=1;
      viscl[c]=1;
      ans-=(n-ro-1)+(n-cl-1)+1;
      vv.pb(ans);
      ro++,cl++;
    }
    else if(!visro[r]&&viscl[c])
    {
        ans-=(n-cl);
        visro[r]=1;
        ro++;
        vv.pb(ans);
    }
    else if(visro[r]&&!viscl[c])
    {
        ans-=(n-ro);
        viscl[c]=1;
        cl++;
        vv.pb(ans);
    }
    else{vv.pb(ans);}

 }
 for(auto h : vv){cout<<h<<" ";}

}


#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define dl endl
#define f first
#define s second
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define vc vector<ll>
#define pr pair<ll,ll>
#define f(i,x,n) for (int i = x;i < n;++i)
using namespace std;
const int N = 200000+9;
ll n,x,r,c;
map<int,bool>viscl,visro;
int ro=0,cl=0;
/*void DFS(int node=1,int bo=0)
{
   vis[node]=bo;
   for(auto h: vv[node])
   {
       if(vis[h]!=-1)
       {
          DFS(h,!bo);
       }
   }
}

*/
int main()
{
ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 cin>>n>>x;
 ll ans=n*n;
 vc vv;
 while(x--)
 {
    cin>>r>>c;
    if(!visro[r]&&!viscl[c])
    {
      visro[r]=1;
      viscl[c]=1;
      ans-=(n-ro-1)+(n-cl-1)+1;
      vv.pb(ans);
      ro++,cl++;
    }
    else if(!visro[r]&&viscl[c])
    {
        ans-=(n-cl);
        visro[r]=1;
        ro++;
        vv.pb(ans);
    }
    else if(visro[r]&&!viscl[c])
    {
        ans-=(n-ro);
        viscl[c]=1;
        cl++;
        vv.pb(ans);
    }
    else{vv.pb(ans);}

 }
 for(auto h : vv){cout<<h<<" ";}

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n,m,i,j,k,sum=0;
	cin>>n>>m;
	sum=n*n;
	//vector<pair<long long int,long long int>> pa;
	//int arr[m][2];
	set<int> seh,sel;
	int count=0;
	for(i=0;i<m;i++)
	{
		count=0;
		int a,b;cin>>a>>b;
		seh.insert(a);
		sel.insert(b);
		count=seh.size()*n+sel.size()*n-seh.size()*sel.size();
		cout << sum-count <<" ";
	}

}


#include<bits/stdc++.h>
using namespace std;
#define ulli unsigned long long int
int main()
{
	ulli n,m,i,j,k,sum=0;
	cin>>n>>m;
	sum=n*n;
	//vector<pair<long long int,long long int>> pa;
	//int arr[m][2];
	set<ulli> seh,sel;
	ulli count=0;
	for(i=0;i<m;i++)
	{
		count=0;
		ulli a,b;cin>>a>>b;
		seh.insert(a);
		sel.insert(b);
		count=seh.size()*n+sel.size()*n-seh.size()*sel.size();
		cout << sum-count <<" ";
	}

}


#include<bits/stdc++.h>
using namespace std;
#define ulli unsigned long long int
int main()
{
	ulli n,m,i,j,k,sum=0;
	cin>>n>>m;
	//sum=n*n;

	set<ulli> seh,sel;
	//ulli count=0;
	for(i=0;i<m;i++)
	{
		//count=0;
		ulli a,b;cin>>a>>b;
		seh.insert(a);
		sel.insert(b);
		cout << (n-seh.size())*(n-sel.size()) <<" ";
	}

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n,m,i,j,k,sum=0;
	cin>>n>>m;
	sum=n*n;
	//vector<pair<long long int,long long int>> pa;
	//int arr[m][2];
	set<long long int> seh,sel;
	long long int count=0;
	for(i=0;i<m;i++)
	{
		count=0;
		long long int a,b;cin>>a>>b;
		seh.insert(a);
		sel.insert(b);
		count=seh.size()*n+sel.size()*n-seh.size()*sel.size();
		cout << sum-count <<" ";
	}

}


#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define test long long int t; cin>>t; while(t-->0)
#define fIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define loop(i,n) for (ll i = 0; i < n; i++)

#define sz(x) x.size()
#define F first
#define S second

#define mii map<ll,ll>
#define vi vector<ll>
#define seti set<ll>
#define pii pair<ll,ll>

#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) (a/gcd(a,b))*b

#define endl '\n'
using namespace std;
const int N=1e6;
    int fact(unsigned int n)
    {
    if (n == 0)
        return 1;
    return n * fact(n - 1);
    }

int main()
    {
        fIO
        ll n,m;
        cin>>n>>m;
        ll ans=0;
        set<int> v,h;
        loop(i,m)
        {
            int x,y;
            cin>>x>>y;
            v.insert(y);
            h.insert(x);
            ans=sz(h)*n+sz(v)*n-sz(h)*sz(v);
            ll z=n*n-ans;
            cout<<z<<" ";
        }

    }


#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define test long long int t; cin>>t; while(t-->0)
#define fIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define loop(i,n) for (ll i = 0; i < n; i++)

#define sz(x) int(x.size())
#define F first
#define S second

#define mii map<ll,ll>
#define vi vector<ll>
#define seti set<ll>
#define pii pair<ll,ll>

#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) (a/gcd(a,b))*b

#define endl '\n'
using namespace std;
const int N=1e6;
    int fact(unsigned int n)
    {
    if (n == 0)
        return 1;
    return n * fact(n - 1);
    }

int main()
    {
        fIO
        ll n,m;
        cin>>n>>m;
        ll ans=0;
        set<int> v,h;
        loop(i,m)
        {
            int x,y;
            cin>>x>>y;
            v.insert(y);
            h.insert(x);
            ans=sz(h)*n+sz(v)*n-sz(h)*sz(v);
            ll z=n*n-ans;
            cout<<z<<" ";
        }

    }


#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define test long long int t; cin>>t; while(t-->0)
#define fIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define loop(i,n) for (ll i = 0; i < n; i++)

#define sz(x) int(x.size())
#define F first
#define S second

#define mii map<ll,ll>
#define vi vector<ll>
#define seti set<ll>
#define pii pair<ll,ll>

#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) (a/gcd(a,b))*b

#define endl '\n'
using namespace std;
const int N=1e6;
    int fact(unsigned int n)
    {
    if (n == 0)
        return 1;
    return n * fact(n - 1);
    }

int main()
    {
        fIO
        ll n,m;
        cin>>n>>m;
        ll ans=0;
        set<int> v,h;
        loop(i,m)
        {
            int x,y;
            cin>>x>>y;
            v.insert(y);
            h.insert(x);
            ans=sz(h)*n+sz(v)*n-sz(h)*sz(v);
            cout<<n*n-ans<<" ";
        }

    }


#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define test long long int t; cin>>t; while(t-->0)
#define fIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define loop(i,n) for (ll i = 0; i < n; i++)

#define sz(x) x.size()
#define F first
#define S second

#define mii map<ll,ll>
#define vi vector<ll>
#define seti set<ll>
#define pii pair<ll,ll>

#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) (a/gcd(a,b))*b

#define endl '\n'
using namespace std;
const int N=1e6;
    int fact(unsigned int n)
    {
    if (n == 0)
        return 1;
    return n * fact(n - 1);
    }

int main()
    {
        fIO
        ll n,m;
        cin>>n>>m;
        ll ans=0;
        set<int> v,h;
        loop(i,m)
        {
            int x,y;
            cin>>x>>y;
            v.insert(y);
            h.insert(x);
            ans=(h.size()*n)+(v.size()*n)-(h.size()*v.size());
            ll z=(n*n)-ans;
            cout<<z<<" ";
        }

    }


#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define test long long int t; cin>>t; while(t-->0)
#define fIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define loop(i,n) for (ll i = 0; i < n; i++)

#define sz(x) int(x.size())
#define F first
#define S second

#define mii map<ll,ll>
#define vi vector<ll>
#define seti set<ll>
#define pii pair<ll,ll>

#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) (a/gcd(a,b))*b

#define endl '\n'
using namespace std;
const int N=1e6;
    int fact(unsigned int n)
    {
    if (n == 0)
        return 1;
    return n * fact(n - 1);
    }

int main()
    {
        fIO
        int n,m;
        cin>>n>>m;
        int ans=0;
        set<int> v,h;
        loop(i,m)
        {
            int x,y;
            cin>>x>>y;
            v.insert(y);
            h.insert(x);
            ans=sz(h)*n+sz(v)*n-sz(h)*sz(v);
            cout<<n*n-ans<<" ";
        }

    }


#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define test long long int t; cin>>t; while(t-->0)
#define fIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define loop(i,n) for (ll i = 0; i < n; i++)

#define sz(x) int(x.size())
#define F first
#define S second

#define mii map<ll,ll>
#define vi vector<ll>
#define seti set<ll>
#define pii pair<ll,ll>

#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) (a/gcd(a,b))*b

#define endl '\n'
using namespace std;
const int N=1e6;
    int fact(unsigned int n)
    {
    if (n == 0)
        return 1;
    return n * fact(n - 1);
    }

int main()
    {
        fIO
        int n,m;
        cin>>n>>m;
        int ans=0;
        set<int> v,h;
        loop(i,n)
        {
            int x,y;
            cin>>x>>y;
            v.insert(y);
            h.insert(x);
            ans=sz(h)*n+sz(v)*n-sz(h)*sz(v);
            cout<<n*n-ans<<" ";
        }

    }


#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define test long long int t; cin>>t; while(t-->0)
#define fIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define loop(i,n) for (ll i = 0; i < n; i++)

#define sz(x) x.size()
#define F first
#define S second

#define mii map<ll,ll>
#define vi vector<ll>
#define seti set<ll>
#define pii pair<ll,ll>

#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) (a/gcd(a,b))*b

#define endl '\n'
using namespace std;
const int N=1e6;
    int fact(unsigned int n)
    {
    if (n == 0)
        return 1;
    return n * fact(n - 1);
    }

int main()
    {
        fIO
        ll n,m;
        cin>>n>>m;
        ll ans=0;
        set<ll> v,h;
        loop(i,m)
        {
            int x,y;
            cin>>x>>y;
            v.insert(y);
            h.insert(x);
            ans=(h.size()*n)+(v.size()*n)-(h.size()*v.size());
            ll z=(n*n)-ans;
            cout<<z<<" ";
        }

    }


#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define test long long int t; cin>>t; while(t-->0)
#define fIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define loop(i,n) for (ll i = 0; i < n; i++)

#define sz(x) x.size()
#define F first
#define S second

#define mii map<ll,ll>
#define vi vector<ll>
#define seti set<ll>
#define pii pair<ll,ll>

#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) (a/gcd(a,b))*b

#define endl '\n'
using namespace std;
const int N=1e6;
    int fact(unsigned int n)
    {
    if (n == 0)
        return 1;
    return n * fact(n - 1);
    }

int main()
    {
        fIO
        ll n,m;
        cin>>n>>m;
        ll ans=0;
        set<ll> v,h;
        loop(i,m)
        {
            int x,y;
            cin>>x>>y;
            v.insert(y);
            h.insert(x);
            ll z=(n-v.size())*(n-h.size());
            cout<<z<<" ";
        }

    }


#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define test long long int t; cin>>t; while(t-->0)
#define fIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define loop(i,n) for (ll i = 0; i < n; i++)

#define sz(x) x.size()
#define F first
#define S second

#define mii map<ll,ll>
#define vi vector<ll>
#define seti set<ll>
#define pii pair<ll,ll>

#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) (a/gcd(a,b))*b

#define endl '\n'
using namespace std;
const int N=1e6;
    int fact(unsigned int n)
    {
    if (n == 0)
        return 1;
    return n * fact(n - 1);
    }

int main()
    {
        fIO
        ll n,m;
        cin>>n>>m;
        ll ans=0;
        set<int> v,h;
        loop(i,m)
        {
            int x,y;
            cin>>x>>y;
            v.insert(y);
            h.insert(x);
            ans=h.size()*n+v.size()*n-h.size()*v.size();
            ll z=n*n-ans;
            cout<<z<<" ";
        }

    }


	#include <bits/stdc++.h>
	#include <cstdio>
	#include <cstring>
	#include <cmath>
	#include <cstring>
	#include <chrono>
	#include <complex>
	#define endl "\n"
	#define ll long long int
	#define vi vector<int>
	#define vll vector<ll>
	#define vvi vector < vi >
	#define pii pair<int,int>
	#define pll pair<long long, long long>
	#define mod 1000000007
	#define inf 1000000000000000001;
	#define all(c) c.begin(),c.end()
	#define mp(x,y) make_pair(x,y)
	#define mem(a,val) memset(a,val,sizeof(a))
	#define eb emplace_back
	#define f first
	#define s second

	using namespace std;
	int main()
	{

		int64_t n,m;

		cin>>n>>m;

		set<int64_t> r;
		set<int64_t> c;

		while(m--) {
			int64_t a,b;

			cin>>a>>b;

			r.insert(a);
			c.insert(b);

			int64_t y=r.size()*n+c.size()*n-(r.size())*(c.size());

			cout<<n*n-y<<" ";

		}

		return 0;
	}


	#include <bits/stdc++.h>
	#include <cstdio>
	#include <cstring>
	#include <cmath>
	#include <cstring>
	#include <chrono>
	#include <complex>
	#define endl "\n"
	#define ll long long int
	#define vi vector<int>
	#define vll vector<ll>
	#define vvi vector < vi >
	#define pii pair<int,int>
	#define pll pair<long long, long long>
	#define mod 1000000007
	#define inf 1000000000000000001;
	#define all(c) c.begin(),c.end()
	#define mp(x,y) make_pair(x,y)
	#define mem(a,val) memset(a,val,sizeof(a))
	#define eb emplace_back
	#define f first
	#define s second

	using namespace std;
	int main()
	{

		int64_t n,m;

		cin>>n>>m;

		int64_t g=n*n;

		set<int64_t> r;
		set<int64_t> c;

		int64_t county=0;

		while(m--) {
			int64_t a,b;

			cin>>a>>b;

			r.insert(a);
			c.insert(b);

			int64_t y=r.size()*n+c.size()*n-r.size()*c.size();

			cout<<n*n-y<<" ";

			r.insert(a);
			c.insert(b);
		}

		return 0;
	}


	#include <bits/stdc++.h>
	#include <cstdio>
	#include <cstring>
	#include <cmath>
	#include <cstring>
	#include <chrono>
	#include <complex>
	#define endl "\n"
	#define ll long long int
	#define vi vector<int>
	#define vll vector<ll>
	#define vvi vector < vi >
	#define pii pair<int,int>
	#define pll pair<long long, long long>
	#define mod 1000000007
	#define inf 1000000000000000001;
	#define all(c) c.begin(),c.end()
	#define mp(x,y) make_pair(x,y)
	#define mem(a,val) memset(a,val,sizeof(a))
	#define eb emplace_back
	#define f first
	#define s second

	using namespace std;
	int main()
	{

		int64_t n,m;

		cin>>n>>m;

		int64_t g=n*n;

		set<int64_t> r;
		set<int64_t> c;

		int64_t county=0;

		while(m--) {
			int64_t a,b;

			cin>>a>>b;

			r.insert(a);
			c.insert(b);

			int64_t y=r.size()*n+c.size()*n-r.size()*c.size();

			cout<<n*n-y<<" ";

		}

		return 0;
	}


	#include <bits/stdc++.h>
	#include <cstdio>
	#include <cstring>
	#include <cmath>
	#include <cstring>
	#include <chrono>
	#include <complex>
	#define endl "\n"
	#define ll long long int
	#define vi vector<int>
	#define vll vector<ll>
	#define vvi vector < vi >
	#define pii pair<int,int>
	#define pll pair<long long, long long>
	#define mod 1000000007
	#define inf 1000000000000000001;
	#define all(c) c.begin(),c.end()
	#define mp(x,y) make_pair(x,y)
	#define mem(a,val) memset(a,val,sizeof(a))
	#define eb emplace_back
	#define f first
	#define s second

	using namespace std;
	int main()
	{

		int64_t n,m;

		cin>>n>>m;

		set<int64_t> r;
		set<int64_t> c;

		while(m--) {
			int64_t a,b;

			cin>>a>>b;

			r.insert(a);
			c.insert(b);

			int64_t x=r.size();
			int64_t y=c.size();

			cout<<n*n-(n*x+n*y-x*y)<<" ";

		}

		return 0;
	}


#include <bits/stdc++.h>
using namespace std;

#define int long long
using pii = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1 << 29;
const int N = 1e6 + 2;

struct IOsetup{
  IOsetup(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    cout << fixed << setprecision(20);
  }
}IO;

int32_t main(){
  int n, m;
  cin >> n >> m;
  int r[n + 1] = {0};
  int c[n + 1] = {0};
  vector<int> ans;
  while (m--){
    int rx, ry;
    cin >> rx >> ry;
    r[rx] = 1, c[ry] = 1;
    int x = 0, y = 0;
    for (int i = 1; i <= n; i++){
      x += r[i] == 0;
      y += c[i] == 0;
    }
    int prod = x * y;
    ans.push_back(prod);
  }
  for (auto it :ans)
    cout << it << " ";
}


#include <bits/stdc++.h>
using namespace std;

#define int long long
using pii = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1 << 29;
const int N = 1e6 + 2;

struct IOsetup{
  IOsetup(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    cout << fixed << setprecision(20);
  }
}IO;

const int MAX_N = 1e5 + 10;
bool r[MAX_N], c[MAX_N];

int32_t main(){
  int n, m;
  cin >> n >> m;
  memset(r, false, sizeof r);
  memset(c, false, sizeof c);
  int ax = n, ay = n;
  while (m--){
    int x, y;
    cin >> x >> y;
    ax -= !r[x];
    ay -= !r[y];
    r[x] = true;
    c[y] = true;
    int prod = ax * ay;
    cout << prod << " ";
  }
}


#include <bits/stdc++.h>
using namespace std;

#define int long long
using pii = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1 << 29;
const int N = 1e6 + 2;

struct IOsetup{
  IOsetup(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    cout << fixed << setprecision(20);
  }
}IO;

const int MAX_N = 1e5 + 10;
bool r[MAX_N], c[MAX_N];

int32_t main(){
  int n, m;
  cin >> n >> m;
  memset(r, false, sizeof r);
  memset(c, false, sizeof c);
  int ax = n, ay = n;
  int prod = 1ll;
  vector<int> ans;
  while (m--){
    int x, y;
    cin >> x >> y;
    ax -= !r[x];
    ay -= !c[y];
    r[x] = true;
    c[y] = true;
    prod = ax * ay;
    ans.push_back(prod);
  }
  for (auto it : ans)
    cout << it << " ";
}


#include <bits/stdc++.h>
using namespace std;

#define int long long
using pii = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1 << 29;
const int N = 1e6 + 2;

struct IOsetup{
  IOsetup(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    cout << fixed << setprecision(20);
  }
}IO;

int32_t main(){
  int n, m;
  cin >> n >> m;
  int r[n + 1] = {0};
  int c[m + 1] = {0};
  vector<int> ans;
  while (m--){
    int rx, ry;
    cin >> rx >> ry;
    r[rx] = 1, c[ry] = 1;
    int x = 0, y = 0;
    for (int i = 1; i <= n; i++){
      x += r[i] == 0;
      y += c[i] == 0;
    }
    int prod = x * y;
    ans.push_back(prod);
  }
  for (auto it :ans)
    cout << it << " ";
}


#include <bits/stdc++.h>
#define F first
#define S second
#define PB push_back
#define ld long double
#define lb lower_bound
#define ub upper_bound
#define ar array
#define sz(x) (int)x.size()
#define bit(x) __builtin_popcount(x)
#define all(x) (x).begin(), (x).end()
#define FOR(l,r,c) for(int c=(l);c<=(r);c++)
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
template<typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }
template<typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }
using ll = long long;
#define int ll
const int N = 2e6 + 7;
const int MOD = 1e9 + 7;
const int inf = 1e9 + 7;
const int inf1 = 2e9 + 7;
const ll inf2 = 2e10 + 7;
const ll inf3 = 2e18 + 7;
const int dx[] = {-1, 0, 1, 0, 1, -1, -1, 1};
const int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
using namespace std;

void solve() {
    int n, m;
    cin >> n >> m;
    ll cnt = n * n;
    ll k = 2 * n - 1;
    for (int i = 1; i <= m; i ++) {
        int x, y;
        cin >> x >> y;
        cnt -= k;
        if (cnt < 0) cnt = 0;
        cout << cnt << '\n';
        k -= 2;
    }
}

main(){
    speed;
    int tt = 1;
    //cin >> tt;
    while (tt --){
        solve();
        cout << '\n';
    }
}


#include <bits/stdc++.h>

#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;

using namespace std;

#define F first
#define S second
#define EB emplace_back
#define PB push_back
#define ld long double
#define lb lower_bound
#define ub upper_bound
#define ar array
#define sz(x) (int)x.size()
#define bit(x) __builtin_popcount(x)
#define all(x) (x).begin(), (x).end()
#define FOR(l,r,c) for(int c=(l);c<=(r);c++)

template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

template<typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }
template<typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }

// 87077969797 goat

using ll = long long;
//#define int ll

const int N = 2e6 + 7;
const int MOD = 1e9 + 7;
const int inf = 2e9 + 7;
const int dx[] = {-1, 0, 1, 0, 1, -1, -1, 1};
const int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};

map <int, int> l, r;

void solve()
{
	int n, m;
	int x = 0, y = 0;
	cin >> n >> m;
	while (m --) {
		int  a, b;
		cin >> a >> b;
		if (!l[a]) {
		 	x ++; l[a] ++;
		}
		if (!r[b]) {
		 	y ++; r[b] ++;
		}
		cout << (n * n) - ((x * n) + (n * y) - (x * y)) << '\n';
	}
}
main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int tt = 1;
    //cin >> tt;
    while (tt --){
        solve();
        cout << '\n';
    }
}


#include <bits/stdc++.h>

#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;

using namespace std;

#define F first
#define S second
#define EB emplace_back
#define PB push_back
#define ld long double
#define lb lower_bound
#define ub upper_bound
#define ar array
#define sz(x) (int)x.size()
#define bit(x) __builtin_popcount(x)
#define all(x) (x).begin(), (x).end()
#define FOR(l,r,c) for(int c=(l);c<=(r);c++)

template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

template<typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }
template<typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }

// 87077969797 goat

using ll = long long;
#define int ll

const int N = 2e6 + 7;
const int MOD = 1e9 + 7;
const int inf = 2e9 + 7;
const int dx[] = {-1, 0, 1, 0, 1, -1, -1, 1};
const int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};

map <int, int> l, r;

void solve()
{
	int n, m;
	int x = 0, y = 0;
	cin >> n >> m;
	while (m --) {
		int  a, b;
		cin >> a >> b;
		if (!l[a]) {
		 	x ++; l[a] ++;
		}
		if (!r[b]) {
		 	y ++; r[b] ++;
		}
		cout << (n * n) - ((x * n) + (n * y) - (x * y)) << '\n';
	}
}
main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int tt = 1;
    //cin >> tt;
    while (tt --){
        solve();
        cout << '\n';
    }
}


#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
const int N=1e6+1;
int r[6]={4,5,6,3,2,1};
int main()
{
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    long long int a,b,z_row1=0,z_col1=0,s;
    bool z_row[N],z_col[N];
    cin >>a>>b;
    s=a*a;
    while (b--)
    {
        int x,y,k=0;
        cin >>x>>y;
        if (!z_row[x])
        {
            s-=(a-z_col1);
            k--;
        }
        if (!z_col[y])
        {
            s-=(k+a-z_row1);
        }
        if (!z_row[x])
        {
            z_row1++;
        }
        if (!z_col[y])
        {
            z_col1++;
        }
        z_row[x]=true;
        z_col[y]=true;
        cout<<s<<" ";
    }
}


#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
const int N=1e6+1;
vector<long long> o;
int r[6]={4,5,6,3,2,1};
int main()
{
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    long long int a,b,z_row1=0,z_col1=0,s;
    bool z_row[N],z_col[N];
    cin >>a>>b;
    s=a*a;
    while (b--)
    {
        int x,y,k=0;
        cin >>x>>y;
        if (!z_row[x])
        {
            s-=(a-z_col1);
            k--;
        }
        if (!z_col[y])
        {
            s-=(k+a-z_row1);
        }
        if (!z_row[x])
        {
            z_row1++;
        }
        if (!z_col[y])
        {
            z_col1++;
        }
        z_row[x]=true;
        z_col[y]=true;
        o.push_back(s);
    }
    for (auto l:o)
    {
        cout<<l<<" ";
    }
}


#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
const int N=1e5+1;
int r[6]={4,5,6,3,2,1};
int main()
{
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    long long int a,b,z_row1=0,z_col1=0,s;
    bool z_row[N],z_col[N];
    cin >>a>>b;
    s=a*a;
    while (b--)
    {
        int x,y,k=0;
        cin >>x>>y;
        if (!z_row[x])
        {
            s-=(a-z_col1);
            k--;
        }
        if (!z_col[y])
        {
            s-=(k+a-z_row1);
        }
        if (!z_row[x])
        {
            z_row1++;
        }
        if (!z_col[y])
        {
            z_col1++;
        }
        z_row[x]=true;
        z_col[y]=true;
        cout<<s<<" ";
    }
}


#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
const int N=1e5+1;
int r[6]={4,5,6,3,2,1};
int main()
{
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    long long int a,b,z_row1=0,z_col1=0,s;
    bool z_row[N],z_col[N];
    cin >>a>>b;
    s=a*a;
    while (b--)
    {
        int x,y,k=0;
        cin >>x>>y;
        if (!z_row[x])
        {
            s-=(a-z_col1);
            k--;
        }
        if (!z_col[y])
        {
            s-=(k+a-z_row1);
        }
        if (!z_row[x])
        {
            z_row1++;
        }
        if (!z_col[y])
        {
            z_col1++;
        }
        z_row[x]=true;
        z_col[y]=true;
        cout<<s;
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    ll n,m;cin>>n>>m;
    pair<ll,ll> p[m];
    for(ll i=0;i<m;i++){
        cin>>p[i].first>>p[i].second;
    }
    unordered_map<ll,ll> a,b;
    ll c=n*n,d=0;
    for(ll i=0;i<m;i++){
        if(a.count(p[i].first)==0 && b.count(p[i].second)==0){
            if(d>0) c=(c-((2*n)-1)+2);
            else c=(c-((2*n)-1));
            if(c>=0) cout<<c<<" ";
            else cout<<"0 ";
        }
        else{
            if((d-1)>0) c=(c-(n-1)+1);
            else c=(c-(n-1));
            if(c>=0) cout<<c<<" ";
            else cout<<"0 ";
        }
        a[p[i].first]=1;b[p[i].second]=1;
        d++;
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    ll n,k;
    cin>>n>>k;
    ll ans=n*n;
    unordered_map<int,int> r,c;ll p=0,q=0;
    while(k--){
        ll x,y;cin>>x>>y;int f=0;
        if(r.count(x)==0){
            f++;
            r[x]=1;p++;
            ans-=(n-p+1);
        }
        if(c.count(y)==0){
            f++;
            c[y]=1;q++;
            ans-=(n-q+1);
        }
        if(f==2) ans++;
        if(ans<0) ans=0;
        cout<<ans<<" ";
    }cout<<endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    ll n,k;
    cin>>n>>k;
    ll ans=n*n;
    unordered_map<int,int> r,c;ll p=0,q=0;
    while(k--){
        ll x,y;cin>>x>>y;int f1=0,f2=0;
        if(r.count(x)==0){
            f1=1;
            r[x]=1;p++;
        }
        if(c.count(y)==0){
            f2=1;
            c[y]=1;q++;
        }
        if(f1==1){
            ans-=(n-q);
        }
        if(f2==1){
            ans-=(n-p);
        }
        if(f1==1 && f2==1) ans--;
        if(ans<0) ans=0;
        cout<<ans<<" ";
    }cout<<endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    ll n,k;
    cin>>n>>k;
    ll ans=n*n;
    unordered_map<int,int> r,c;ll p=0,q=0;
    while(k--){
        ll x,y;cin>>x>>y;int f=0;
        if(r.count(x)==0){
            f++;
            r[x]=1;p++;
        }
        else ans+=(n-p);
        if(c.count(y)==0){
            f++;
            c[y]=1;q++;
        }
        else ans+=(n-q);
        if(p==n || q==n) ans=0;
        else ans-=(2*n-(p*q));
        if(p==q && p!=1) ans-=1;
        if(ans>=0) cout<<ans<<" ";
        else cout<<"0 ";
    }cout<<endl;
}