#include <bits/stdc++.h>
using namespace std;
///////////////////////////
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
typedef tree<
long long,
null_type,
less<long long>,// _equal for multiset
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
///////////////////////////
#define int long long
#define F(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define R(i,b,a) for(int i=(int)(b);i>=(int)(a);i--)
#define endl "\n"
#define ios ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define out(x) cout<<x<<endl,exit(0)
#define pii pair<int,int>
#define pb push_back
#define all(v) v.begin(),v.end()
#define I first
#define S second

const int N=2e5+8;
int h,w,m,cnt[N];
vector <int> v[N];
ordered_set con;

int32_t main(){
   ios;
   cin>>h>>w>>m;

   int mn=1e9;
   F(i,1,m){
   	int x,y;
   	cin>>x>>y;
   	if(x==1) mn=min(mn,y);
   	v[y].pb(x);
   	con.insert(x);
   	cnt[x]++;
   }

   //dummy obstacles
   if(mn<1e9){
   	F(j,mn+1,w){
   		con.insert(1);
   		v[j].pb(1);
   		cnt[1]++;
   	}
   }
   if(v[1].size()){
   	int id=*min_element(all(v[1]));
   	F(i,id+1,h){
   		con.insert(i);
   		cnt[i]++;
   	}
   }  

   //subtracting unreachable points
   int ans=h*w;
   R(j,w,1){
   	if(v[j].size()==0) continue;
   	int id=*min_element(all(v[j]));
   	ans-=con.size()-con.order_of_key(id);
   	for(auto it:v[j]){
   		cnt[it]--;
   		if(cnt[it]==0) con.erase(it);
   	}
   }
   cout<<ans<<endl;
}

#pragma GCC optimize("O3")
//#pragma GCC target("avx")
#include <bits/stdc++.h>
using namespace std;
#define re return
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define make_unique(x) sort(all(x)),x.resize(unique(all(x))-x.begin())
#define fi first
#define se second
#define ss second.second
#define sf second.first
#define ff first.first
#define fs first.second
#define sqrt(x) sqrt(abs(x))
#define mp make_pair
#define PI 3.14159265358979323846
#define E 2.71828182845904523536
#define er erase
#define in insert
#define fo(i,n) for((i)=0;(i)<(n);(i)++)
#define ro(i,n) for((i)=n-1;(i)>=0;(i)--)
#define fr(i,j,n) for((i)=(j);(i)<(n);(i)++)
#define rf(i,j,n) for((i)=((n)-1);(i)>=(j);(i)--)
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;
void eras(map<int,int> &m,int x)
{
    m[x]--;
    if (!m[x])
        m.erase(x);
}
const int N=(int)3e5+100;
const int M=(int)2e6+100;
const int inf=(int)1e9+100;
#define filename ""

int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    //freopen(filename".in","r",stdin);
    //freopen(filename".out","w",stdout);
    //freopen("ans.txt","w",stdout);
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    srand(time(0));
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    int a,b,w,i;
    cin>>a>>b>>w;
    w*=1000;
    fr(i,1,1000001)
    {
        if (a*i<=w&&w<=b*i) break;
    }
    if (i==1000001)
    {
        cout<<"UNSATISFIABLE";
    }
    else
    {
        cout<<i<<' ';
        while(a*(i+1)<=w&&w<=b*(i+1))
        {
            i++;
        }
        cout<<i;
    }
}
