Jichang Xueshe
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Jichang Xueshe, the most important thing is persistence!

Jichang learned how to shoot from Feiwei, and succeeded three years later. When an arrow is shot, it can shoot through three view planes (front view, right view and top view) of a cube with side length N at the same time, and the coordinates of the view planes penetrated are the same. The unit cube (side length is 1) hit by the arrow will disappear immediately. Do you know how much volume is left in the cube after Jichang shoots the M arrow?

The three view planes of the cube are assigned coordinates in the same way. For example, the coordinates of the cube with side length of 3 and the three view planes are shown in the following figure.

输入描述:

The first line is two integers N (1≤N≤100), M (0≤M≤N×N) , representing the side length of the cube and the number of times Jichangshoots. Next, there are M rows, each row contains two integers a, b (1≤a, b≤N), which are the two coordinate values of the view surface.

输出描述:

Output an integer, that is, the remaining volume of the cube.

示例1

输入

复制
3 1
1 1

输出

复制
20