#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int N,M,P;
pair<int,int> A[202020];
int BC[1<<20];
int X[202020],Y[202020],Z[202020];

static ll const def=-1LL<<60;
template<class V,int NV> class SegTree_3 {
public:
	vector<V> val, ma;
	SegTree_3(){
		int i;
		val.resize(NV*2,0); ma.resize(NV*2,0);
	};

	V getval(int x,int y,int l=0,int r=NV,int k=1) {
		if(r<=x || y<=l) return def;
		if(x<=l && r<=y) return ma[k];
		return val[k]+max(getval(x,y,l,(l+r)/2,k*2),getval(x,y,(l+r)/2,r,k*2+1));
	}

	void update(int x,int y, V v,int l=0,int r=NV,int k=1) {
		if(l>=r) return;
		if(x<=l && r<=y) {
			val[k]+=v;
			ma[k]+=v;
		}
		else if(l < y && x < r) {
			update(x,y,v,l,(l+r)/2,k*2);
			update(x,y,v,(l+r)/2,r,k*2+1);
			ma[k]=val[k]+max(ma[k*2],ma[k*2+1]);
		}
	}
};
SegTree_3<ll,1<<20> st;
vector<pair<int,int>> ev[1010101];

void solve() {
	int i,j,k,l,r,x,y; string s;

	scanf("%d%d%d",&N,&M,&P);

	FOR(i,N) scanf("%d%d",&A[i].first,&A[i].second);
	FOR(i,1<<20) BC[i]=-1<<30;
	FOR(i,M) {
		scanf("%d%d",&x,&y);
		BC[x]=max(BC[x],-y);
	}

	for(i=(1<<20)-2;i>=0;i--) BC[i]=max(BC[i],BC[i+1]);
	FOR(i,1<<20) st.update(i,i+1,BC[i]);

	FOR(i,P) {
		scanf("%d%d%d",&X[i],&Y[i],&Z[i]);
		ev[X[i]].push_back({Y[i],Z[i]});
	}

	ll ma=-1LL<<60;
	sort(A,A+N);
	int pre=0;
	FOR(i,N) {
		while(pre<A[i].first) {
			FORR(e,ev[pre]) {
				st.update(e.first+1,1<<20,e.second);
			}
			pre++;
		}
		ll sc=-A[i].second+st.getval(0,1<<20);
		ma=max(ma,sc);
	}
	cout<<ma<<endl;

}

int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int N,M,P;
pair<int,int> A[202020];
int BC[1<<20];
int X[202020],Y[202020],Z[202020];

static ll const def=-1LL<<60;
template<class V,int NV> class SegTree_3 {
public:
	vector<V> val, ma;
	SegTree_3(){
		int i;
		val.resize(NV*2,0); ma.resize(NV*2,0);
	};

	V getval(int x,int y,int l=0,int r=NV,int k=1) {
		if(r<=x || y<=l) return def;
		if(x<=l && r<=y) return ma[k];
		return val[k]+max(getval(x,y,l,(l+r)/2,k*2),getval(x,y,(l+r)/2,r,k*2+1));
	}

	void update(int x,int y, V v,int l=0,int r=NV,int k=1) {
		if(l>=r) return;
		if(x<=l && r<=y) {
			val[k]+=v;
			ma[k]+=v;
		}
		else if(l < y && x < r) {
			update(x,y,v,l,(l+r)/2,k*2);
			update(x,y,v,(l+r)/2,r,k*2+1);
			ma[k]=val[k]+max(ma[k*2],ma[k*2+1]);
		}
	}
};
SegTree_3<ll,1<<20> st;
vector<pair<int,int>> ev[1010101];

void solve() {
	int i,j,k,l,r,x,y; string s;

	scanf("%d%d%d",&N,&M,&P);

	FOR(i,N) scanf("%d%d",&A[i].first,&A[i].second);
	FOR(i,1<<20) BC[i]=-1<<30;
	FOR(i,M) {
		scanf("%d%d",&x,&y);
		BC[x]=max(BC[x],-y);
	}

	for(i=(1<<20)-2;i>=0;i--) BC[i]=max(BC[i],BC[i+1]);
	FOR(i,1<<20) st.update(i,i+1,BC[i]);

	FOR(i,P) {
		scanf("%d%d%d",&X[i],&Y[i],&Z[i]);
		ev[X[i]].push_back({Y[i],Z[i]});
	}

	ll ma=-1LL<<60;
	sort(A,A+N);
	int pre=-1
	FOR(i,N) {
		while(pre<A[i].first) {
			FORR(e,ev[pre]) {
				st.update(e.first+1,1<<20,e.second);
			}
			pre++;
		}
		ll sc=-A[i].second+st.getval(0,1<<20);
		ma=max(ma,sc);
		ma=max(ma,-A[i].second-BC[0]);
	}
	cout<<ma<<endl;

}

int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;

template<class T>
using ordered_set = __gnu_pbds::tree<T, __gnu_pbds::null_type, less<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class T> //CANNOT ERASE FROM ORDERED MULTISET!!
using ordered_multiset = __gnu_pbds::tree<T, __gnu_pbds::null_type, less_equal<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class K, class T>
using hash_map = __gnu_pbds::gp_hash_table<K,T>;
template<class K, class T, class L>
using hash_map_custom_hash = __gnu_pbds::gp_hash_table<K,T,L>;

typedef long long ll;
typedef long double ld;

#define IN_PROGRESS 1
#if IN_PROGRESS > 0

bool inside(int inI, int inJ, int left, int right) {
	return (left <= inI) && (inJ <= right);
}

bool intersects(int i, int j, int l, int r) {
	return (j >= l) && (i <= r);
}

struct SegmentTree {

		vector<ll> lazy;
		vector<ll> sum;
		vector<ll> m;

		SegmentTree(int n) {
			lazy.resize(4 * n);
			sum.resize(4 * n);
			m.resize(4 * n);
		}

		ll queryS(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return 0;
			}

			if (inside(i, j, l, r)) {
				return sum[vert] + lazy[vert] * (j - i + 1);
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = queryS(vert * 2, i, mid, l, r) + queryS(vert * 2 + 1, mid + 1, j, l, r);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		ll queryM(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return LLONG_MAX;
			}

			if (inside(i, j, l, r)) {
				return m[vert] + lazy[vert];
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = min(queryM(vert * 2, i, mid, l, r), queryM(vert * 2 + 1, mid + 1, j, l, r));

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		void update(int vert, int i, int j, int l, int r, ll a) {
			if (!intersects(i, j, l, r)) {
				return;
			}

			if (inside(i, j, l, r)) {
				lazy[vert] += a;
				return;
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			update(vert * 2, i, mid, l, r, a);
			update(vert * 2 + 1, mid + 1, j, l, r, a);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

		}

};

SegmentTree tree(1000010);
set<int> weaponPowers;
vector<pair<int, int>> weapon;

vector<pair<int, int>> monsters;

multiset<int> above;
multiset<pair<int, int>> q;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	//freopen("stress.in", "r", stdin);

	int n, m, p;
	cin >> n >> m >> p;

	for (int i = 0; i < n; i++) {
		int a, ca;
		cin >> a >> ca;
		weaponPowers.insert(a);
		weapon.push_back(make_pair(a, ca));
	}

	for (int i = 0; i < m; i++) {
		int b, cb;
		cin >> b >> cb;

		q.insert(make_pair(b, -cb));
		above.insert(cb);
	}
	//sort(weaponPowers.begin(), weaponPowers.end());
	for(int i = 0; i < 1000010; i++) {
		if(weaponPowers.find(i) == weaponPowers.end()) {
			tree.update(1, 0, 1000009, i, i, LLONG_MAX / 3);
		}
	}

	for (int i = 0; i < p; i++) {
		int attack, defense, coins;
		cin >> attack >> defense >> coins;
//		weaponPowers.push_back(attack);
		monsters.push_back(make_pair(attack, coins));
		q.insert(make_pair(defense, i));
	}

//	sort(weaponPowers.begin(), weaponPowers.end());
	for (auto a : weapon) {
	//	a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
		ll cost = tree.queryM(1, 0, 1000009, a.first, a.first);
		if(cost > a.second)
			tree.update(1, 0, 1000009, a.first, a.first, a.second-cost);
	}
//	for (auto a : monsters) {
//		a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
//	}

	ll ans = LLONG_MIN;

	while (!q.empty()) {
		auto a = *q.begin();
		q.erase(q.begin());
	/*
		cout << a.first << " " << a.second << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryM(1, 0, 1000009, i, i) << " ";
		}
		cout << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryS(1, 0, 1000009, i, i) << " ";
		}
		cout << endl;
		*/

		if (a.second < 0) {
			ans = max(ans, -tree.queryM(1, 0, 1000009, 0, 1000009) - *above.begin());
			above.erase(above.find(-a.second));

			//cout << -tree.queryM(1, 0, 1000009, 0, 1000009) << " " << *above.begin() << endl;
		} else {
			auto monster = monsters[a.second];
			tree.update(1, 0, 1000009, monster.first + 1, 1000009, -monster.second);
		}
	}

	cout << ans << "\n";

	return 0;
}
#endif


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;

template<class T>
using ordered_set = __gnu_pbds::tree<T, __gnu_pbds::null_type, less<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class T> //CANNOT ERASE FROM ORDERED MULTISET!!
using ordered_multiset = __gnu_pbds::tree<T, __gnu_pbds::null_type, less_equal<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class K, class T>
using hash_map = __gnu_pbds::gp_hash_table<K,T>;
template<class K, class T, class L>
using hash_map_custom_hash = __gnu_pbds::gp_hash_table<K,T,L>;

typedef long long ll;
typedef long double ld;

#define IN_PROGRESS 1
#if IN_PROGRESS > 0

bool inside(int inI, int inJ, int left, int right) {
	return (left <= inI) && (inJ <= right);
}

bool intersects(int i, int j, int l, int r) {
	return (j >= l) && (i <= r);
}

struct SegmentTree {

		vector<ll> lazy;
		vector<ll> sum;
		vector<ll> m;

		SegmentTree(int n) {
			lazy.resize(4 * n);
			sum.resize(4 * n);
			m.resize(4 * n);
		}

		ll queryS(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return 0;
			}

			if (inside(i, j, l, r)) {
				return sum[vert] + lazy[vert] * (j - i + 1);
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = queryS(vert * 2, i, mid, l, r) + queryS(vert * 2 + 1, mid + 1, j, l, r);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		ll queryM(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return LLONG_MAX;
			}

			if (inside(i, j, l, r)) {
				return m[vert] + lazy[vert];
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = min(queryM(vert * 2, i, mid, l, r), queryM(vert * 2 + 1, mid + 1, j, l, r));

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		void update(int vert, int i, int j, int l, int r, ll a) {
			if (!intersects(i, j, l, r)) {
				return;
			}

			if (inside(i, j, l, r)) {
				lazy[vert] += a;
				return;
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			update(vert * 2, i, mid, l, r, a);
			update(vert * 2 + 1, mid + 1, j, l, r, a);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

		}

};

SegmentTree tree(1000010);
set<int> weaponPowers;
vector<pair<int, int>> weapon;

vector<pair<int, int>> monsters;

multiset<int> above;
multiset<pair<int, int>> q;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	//freopen("stress.in", "r", stdin);

	int n, m, p;
	cin >> n >> m >> p;

	for (int i = 0; i < n; i++) {
		int a, ca;
		cin >> a >> ca;
		weaponPowers.insert(a);
		weapon.push_back(make_pair(a, ca));
	}

	for (int i = 0; i < m; i++) {
		int b, cb;
		cin >> b >> cb;

		q.insert(make_pair(b, -cb));
		above.insert(cb);
	}
	//sort(weaponPowers.begin(), weaponPowers.end());
	for(int i = 0; i < 1000010; i++) {
		if(weaponPowers.find(i) == weaponPowers.end()) {
			tree.update(1, 0, 1000009, i, i, LLONG_MAX / 3);
		}
	}

	for (int i = 0; i < p; i++) {
		int attack, defense, coins;
		cin >> attack >> defense >> coins;
//		weaponPowers.push_back(attack);
		monsters.push_back(make_pair(attack, coins));
		q.insert(make_pair(defense, i));
	}

//	sort(weaponPowers.begin(), weaponPowers.end());
	for (auto a : weapon) {
	//	a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
		tree.update(1, 0, 1000009, a.first, a.first, a.second);
	}
//	for (auto a : monsters) {
//		a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
//	}

	ll ans = LLONG_MIN;

	while (!q.empty()) {
		auto a = *q.begin();
		q.erase(q.begin());
	/*
		cout << a.first << " " << a.second << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryM(1, 0, 1000009, i, i) << " ";
		}
		cout << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryS(1, 0, 1000009, i, i) << " ";
		}
		cout << endl;
		*/

		if (a.second < 0) {
			ans = max(ans, -tree.queryM(1, 0, 1000009, 0, 1000009) - *above.begin());
			above.erase(above.find(-a.second));

			//cout << -tree.queryM(1, 0, 1000009, 0, 1000009) << " " << *above.begin() << endl;
		} else {
			auto monster = monsters[a.second];
			tree.update(1, 0, 1000009, monster.first + 1, 1000009, -monster.second);
		}
	}

	cout << ans << "\n";

	return 0;
}
#endif


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;

template<class T>
using ordered_set = __gnu_pbds::tree<T, __gnu_pbds::null_type, less<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class T> //CANNOT ERASE FROM ORDERED MULTISET!!
using ordered_multiset = __gnu_pbds::tree<T, __gnu_pbds::null_type, less_equal<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class K, class T>
using hash_map = __gnu_pbds::gp_hash_table<K,T>;
template<class K, class T, class L>
using hash_map_custom_hash = __gnu_pbds::gp_hash_table<K,T,L>;

typedef long long ll;
typedef long double ld;

#define IN_PROGRESS 1
#if IN_PROGRESS > 0

bool inside(int inI, int inJ, int left, int right) {
	return (left <= inI) && (inJ <= right);
}

bool intersects(int i, int j, int l, int r) {
	return (j >= l) && (i <= r);
}

struct SegmentTree {

		vector<ll> lazy;
		vector<ll> sum;
		vector<ll> m;

		SegmentTree(int n) {
			lazy.resize(4 * n);
			sum.resize(4 * n);
			m.resize(4 * n);
		}

		ll queryS(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return 0;
			}

			if (inside(i, j, l, r)) {
				return sum[vert] + lazy[vert] * (j - i + 1);
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = queryS(vert * 2, i, mid, l, r) + queryS(vert * 2 + 1, mid + 1, j, l, r);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		ll queryM(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return LLONG_MAX;
			}

			if (inside(i, j, l, r)) {
				return m[vert] + lazy[vert];
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = min(queryM(vert * 2, i, mid, l, r), queryM(vert * 2 + 1, mid + 1, j, l, r));

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		void update(int vert, int i, int j, int l, int r, ll a) {
			if (!intersects(i, j, l, r)) {
				return;
			}

			if (inside(i, j, l, r)) {
				lazy[vert] += a;
				return;
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			update(vert * 2, i, mid, l, r, a);
			update(vert * 2 + 1, mid + 1, j, l, r, a);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

		}

};

SegmentTree tree(1000010);
set<int> weaponPowers;
vector<pair<int, int>> weapon;

vector<pair<int, int>> monsters;

multiset<int> above;
multiset<pair<int, int>> q;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	//freopen("stress.in", "r", stdin);

	int n, m, p;
	cin >> n >> m >> p;

	for (int i = 0; i < n; i++) {
		int a, ca;
		cin >> a >> ca;
		weaponPowers.insert(a);
		weapon.push_back(make_pair(a, ca));
	}

	for (int i = 0; i < m; i++) {
		int b, cb;
		cin >> b >> cb;

		q.insert(make_pair(b, -cb));
		above.insert(cb);
	}
	//sort(weaponPowers.begin(), weaponPowers.end());
	for(int i = 0; i < 1000010; i++) {
		if(weaponPowers.find(i) == weaponPowers.end()) {
			tree.update(1, 0, 1000009, i, i, LLONG_MAX / 3);
		}
	}

	for (int i = 0; i < p; i++) {
		int attack, defense, coins;
		cin >> attack >> defense >> coins;
//		weaponPowers.push_back(attack);
		monsters.push_back(make_pair(attack, coins));
		q.insert(make_pair(defense, i));
	}

//	sort(weaponPowers.begin(), weaponPowers.end());
	for (auto a : weapon) {
	//	a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
		ll cost = tree.queryM(1, 0, 1000009, a.first, a.first);
		if(cost > a.second || cost == 0)
			tree.update(1, 0, 1000009, a.first, a.first, a.second-cost);
	}
//	for (auto a : monsters) {
//		a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
//	}

	ll ans = LLONG_MIN;

	while (!q.empty()) {
		auto a = *q.begin();
		q.erase(q.begin());
	/*
		cout << a.first << " " << a.second << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryM(1, 0, 1000009, i, i) << " ";
		}
		cout << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryS(1, 0, 1000009, i, i) << " ";
		}
		cout << endl;
		*/

		if (a.second < 0) {
			ans = max(ans, -tree.queryM(1, 0, 1000009, 0, 1000009) - *above.begin());
			above.erase(above.find(-a.second));

			//cout << -tree.queryM(1, 0, 1000009, 0, 1000009) << " " << *above.begin() << endl;
		} else {
			auto monster = monsters[a.second];
			tree.update(1, 0, 1000009, monster.first + 1, 1000009, -monster.second);
		}
	}

	cout << ans << "\n";

	return 0;
}
#endif


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;

template<class T>
using ordered_set = __gnu_pbds::tree<T, __gnu_pbds::null_type, less<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class T> //CANNOT ERASE FROM ORDERED MULTISET!!
using ordered_multiset = __gnu_pbds::tree<T, __gnu_pbds::null_type, less_equal<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class K, class T>
using hash_map = __gnu_pbds::gp_hash_table<K,T>;
template<class K, class T, class L>
using hash_map_custom_hash = __gnu_pbds::gp_hash_table<K,T,L>;

typedef long long ll;
typedef long double ld;

#define IN_PROGRESS 1
#if IN_PROGRESS > 0

bool inside(int inI, int inJ, int left, int right) {
	return (left <= inI) && (inJ <= right);
}

bool intersects(int i, int j, int l, int r) {
	return (j >= l) && (i <= r);
}

struct SegmentTree {

		vector<ll> lazy;
		vector<ll> sum;
		vector<ll> m;

		SegmentTree(int n) {
			lazy.resize(4 * n);
			sum.resize(4 * n);
			m.resize(4 * n);
		}

		ll queryS(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return 0;
			}

			if (inside(i, j, l, r)) {
				return sum[vert] + lazy[vert] * (j - i + 1);
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = queryS(vert * 2, i, mid, l, r) + queryS(vert * 2 + 1, mid + 1, j, l, r);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		ll queryM(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return LLONG_MAX;
			}

			if (inside(i, j, l, r)) {
				return m[vert] + lazy[vert];
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = min(queryM(vert * 2, i, mid, l, r), queryM(vert * 2 + 1, mid + 1, j, l, r));

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		void update(int vert, int i, int j, int l, int r, ll a) {
			if (!intersects(i, j, l, r)) {
				return;
			}

			if (inside(i, j, l, r)) {
				lazy[vert] += a;
				return;
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			update(vert * 2, i, mid, l, r, a);
			update(vert * 2 + 1, mid + 1, j, l, r, a);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

		}

};

SegmentTree tree(200010);
vector<int> weaponPowers;
vector<pair<int, int>> weapon;

vector<pair<int, int>> monsters;

multiset<int> above;
multiset<pair<int, int>> q;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	int n, m, p;
	cin >> n >> m >> p;

	for (int i = 0; i < n; i++) {
		int a, ca;
		cin >> a >> ca;
		weaponPowers.push_back(a);
		weapon.push_back(make_pair(a, ca));
	}

	for (int i = 0; i < m; i++) {
		int b, cb;
		cin >> b >> cb;

		q.insert(make_pair(b, -cb));
		above.insert(cb);
	}
	sort(weaponPowers.begin(), weaponPowers.end());
	for(int i = 0; i < 200010; i++) {
		auto it = lower_bound(weaponPowers.begin(), weaponPowers.end(), i);
		if(it == weaponPowers.end() || *it != i) {
			tree.update(1, 0, 200009, i, i, LLONG_MAX / 3);
		}
	}

	for (int i = 0; i < p; i++) {
		int attack, defense, coins;
		cin >> attack >> defense >> coins;
		weaponPowers.push_back(attack);
		monsters.push_back(make_pair(attack, coins));
		q.insert(make_pair(defense, i));
	}
	sort(weaponPowers.begin(), weaponPowers.end());
	for (auto a : weapon) {
		a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
		tree.update(1, 0, 200009, a.first, a.first, a.second);
	}
	for (auto a : monsters) {
		a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
	}

	ll ans = 0;

	while (!q.empty()) {
		auto a = *q.begin();
		q.erase(q.begin());
	/*
		cout << a.first << " " << a.second << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryM(1, 0, 200009, i, i) << " ";
		}
		cout << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryS(1, 0, 200009, i, i) << " ";
		}
		cout << endl;
		*/

		if (a.second < 0) {
			ans = max(ans, -tree.queryM(1, 0, 200009, 0, 200009) - *above.begin());
			above.erase(above.find(-a.second));
		} else {
			auto monster = monsters[a.second];
			tree.update(1, 0, 200009, monster.first + 1, 200009, -monster.second);
		}
	}

	cout << ans << "\n";

	return 0;
}
#endif


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;

template<class T>
using ordered_set = __gnu_pbds::tree<T, __gnu_pbds::null_type, less<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class T> //CANNOT ERASE FROM ORDERED MULTISET!!
using ordered_multiset = __gnu_pbds::tree<T, __gnu_pbds::null_type, less_equal<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class K, class T>
using hash_map = __gnu_pbds::gp_hash_table<K,T>;
template<class K, class T, class L>
using hash_map_custom_hash = __gnu_pbds::gp_hash_table<K,T,L>;

typedef long long ll;
typedef long double ld;

#define IN_PROGRESS 1
#if IN_PROGRESS > 0

bool inside(int inI, int inJ, int left, int right) {
	return (left <= inI) && (inJ <= right);
}

bool intersects(int i, int j, int l, int r) {
	return (j >= l) && (i <= r);
}

struct SegmentTree {

		vector<ll> lazy;
		vector<ll> sum;
		vector<ll> m;

		SegmentTree(int n) {
			lazy.resize(4 * n);
			sum.resize(4 * n);
			m.resize(4 * n);
		}

		ll queryS(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return 0;
			}

			if (inside(i, j, l, r)) {
				return sum[vert] + lazy[vert] * (j - i + 1);
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = queryS(vert * 2, i, mid, l, r) + queryS(vert * 2 + 1, mid + 1, j, l, r);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		ll queryM(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return LLONG_MAX;
			}

			if (inside(i, j, l, r)) {
				return m[vert] + lazy[vert];
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = min(queryM(vert * 2, i, mid, l, r), queryM(vert * 2 + 1, mid + 1, j, l, r));

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		void update(int vert, int i, int j, int l, int r, ll a) {
			if (!intersects(i, j, l, r)) {
				return;
			}

			if (inside(i, j, l, r)) {
				lazy[vert] += a;
				return;
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			update(vert * 2, i, mid, l, r, a);
			update(vert * 2 + 1, mid + 1, j, l, r, a);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

		}

};

SegmentTree tree(1000010);
set<int> weaponPowers;
vector<pair<int, int>> weapon;

vector<pair<int, int>> monsters;

multiset<int> above;
multiset<pair<int, int>> q;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	//freopen("stress.in", "r", stdin);

	int n, m, p;
	cin >> n >> m >> p;

	for (int i = 0; i < n; i++) {
		int a, ca;
		cin >> a >> ca;
		weaponPowers.insert(a);
		weapon.push_back(make_pair(a, ca));
	}

	for (int i = 0; i < m; i++) {
		int b, cb;
		cin >> b >> cb;

		q.insert(make_pair(b, -cb));
		above.insert(cb);
	}
	//sort(weaponPowers.begin(), weaponPowers.end());
	for(int i = 0; i < 1000010; i++) {
		if(weaponPowers.find(i) == weaponPowers.end()) {
			tree.update(1, 0, 1000009, i, i, LLONG_MAX / 3);
		}
	}

	for (int i = 0; i < p; i++) {
		int attack, defense, coins;
		cin >> attack >> defense >> coins;
//		weaponPowers.push_back(attack);
		monsters.push_back(make_pair(attack, coins));
		q.insert(make_pair(defense, i));
	}

//	sort(weaponPowers.begin(), weaponPowers.end());
	for (auto a : weapon) {
	//	a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
		ll cost = tree.queryM(1, 0, 1000009, a.first, a.first);
		tree.update(1, 0, 1000009, a.first, a.first, a.second-cost);
	}
//	for (auto a : monsters) {
//		a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
//	}

	ll ans = LLONG_MIN;

	while (!q.empty()) {
		auto a = *q.begin();
		q.erase(q.begin());
	/*
		cout << a.first << " " << a.second << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryM(1, 0, 1000009, i, i) << " ";
		}
		cout << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryS(1, 0, 1000009, i, i) << " ";
		}
		cout << endl;
		*/

		if (a.second < 0) {
			ans = max(ans, -tree.queryM(1, 0, 1000009, 0, 1000009) - *above.begin());
			above.erase(above.find(-a.second));

			//cout << -tree.queryM(1, 0, 1000009, 0, 1000009) << " " << *above.begin() << endl;
		} else {
			auto monster = monsters[a.second];
			tree.update(1, 0, 1000009, monster.first + 1, 1000009, -monster.second);
		}
	}

	cout << ans << "\n";

	return 0;
}
#endif


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;

template<class T>
using ordered_set = __gnu_pbds::tree<T, __gnu_pbds::null_type, less<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class T> //CANNOT ERASE FROM ORDERED MULTISET!!
using ordered_multiset = __gnu_pbds::tree<T, __gnu_pbds::null_type, less_equal<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class K, class T>
using hash_map = __gnu_pbds::gp_hash_table<K,T>;
template<class K, class T, class L>
using hash_map_custom_hash = __gnu_pbds::gp_hash_table<K,T,L>;

typedef long long ll;
typedef long double ld;

#define IN_PROGRESS 1
#if IN_PROGRESS > 0

bool inside(int inI, int inJ, int left, int right) {
	return (left <= inI) && (inJ <= right);
}

bool intersects(int i, int j, int l, int r) {
	return (j >= l) && (i <= r);
}

struct SegmentTree {

		vector<ll> lazy;
		vector<ll> sum;
		vector<ll> m;

		SegmentTree(int n) {
			lazy.resize(4 * n);
			sum.resize(4 * n);
			m.resize(4 * n);
		}

		ll queryS(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return 0;
			}

			if (inside(i, j, l, r)) {
				return sum[vert] + lazy[vert] * (j - i + 1);
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = queryS(vert * 2, i, mid, l, r) + queryS(vert * 2 + 1, mid + 1, j, l, r);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		ll queryM(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return LLONG_MAX;
			}

			if (inside(i, j, l, r)) {
				return m[vert] + lazy[vert];
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = min(queryM(vert * 2, i, mid, l, r), queryM(vert * 2 + 1, mid + 1, j, l, r));

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		void update(int vert, int i, int j, int l, int r, ll a) {
			if (!intersects(i, j, l, r)) {
				return;
			}

			if (inside(i, j, l, r)) {
				lazy[vert] += a;
				return;
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			update(vert * 2, i, mid, l, r, a);
			update(vert * 2 + 1, mid + 1, j, l, r, a);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

		}

};

SegmentTree tree(1000010);
set<int> weaponPowers;
vector<pair<int, int>> weapon;

vector<pair<int, int>> monsters;

multiset<int> above;
multiset<pair<int, int>> q;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	//freopen("stress.in", "r", stdin);

	int n, m, p;
	cin >> n >> m >> p;

	for (int i = 0; i < n; i++) {
		int a, ca;
		cin >> a >> ca;
		weaponPowers.insert(a);
		weapon.push_back(make_pair(a, ca));
	}

	for (int i = 0; i < m; i++) {
		int b, cb;
		cin >> b >> cb;

		q.insert(make_pair(b, -cb));
		above.insert(cb);
	}
	//sort(weaponPowers.begin(), weaponPowers.end());
	for(int i = 0; i < 1000010; i++) {
		if(weaponPowers.find(i) == weaponPowers.end()) {
			tree.update(1, 0, 1000009, i, i, LLONG_MAX / 3);
		}
	}

	for (int i = 0; i < p; i++) {
		int attack, defense, coins;
		cin >> attack >> defense >> coins;
//		weaponPowers.push_back(attack);
		monsters.push_back(make_pair(attack, coins));
		q.insert(make_pair(defense, i));
	}

//	sort(weaponPowers.begin(), weaponPowers.end());
	for (auto a : weapon) {
	//	a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
		tree.update(1, 0, 1000009, a.first, a.first, a.second);
	}
//	for (auto a : monsters) {
//		a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
//	}

	ll ans = 0;

	while (!q.empty()) {
		auto a = *q.begin();
		q.erase(q.begin());
	/*
		cout << a.first << " " << a.second << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryM(1, 0, 1000009, i, i) << " ";
		}
		cout << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryS(1, 0, 1000009, i, i) << " ";
		}
		cout << endl;
		*/

		if (a.second < 0) {
			ans = max(ans, -tree.queryM(1, 0, 1000009, 0, 1000009) - *above.begin());
			above.erase(above.find(-a.second));

			//cout << -tree.queryM(1, 0, 1000009, 0, 1000009) << " " << *above.begin() << endl;
		} else {
			auto monster = monsters[a.second];
			tree.update(1, 0, 1000009, monster.first + 1, 1000009, -monster.second);
		}
	}

	cout << ans << "\n";

	return 0;
}
#endif


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;

template<class T>
using ordered_set = __gnu_pbds::tree<T, __gnu_pbds::null_type, less<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class T> //CANNOT ERASE FROM ORDERED MULTISET!!
using ordered_multiset = __gnu_pbds::tree<T, __gnu_pbds::null_type, less_equal<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template<class K, class T>
using hash_map = __gnu_pbds::gp_hash_table<K,T>;
template<class K, class T, class L>
using hash_map_custom_hash = __gnu_pbds::gp_hash_table<K,T,L>;

typedef long long ll;
typedef long double ld;

#define IN_PROGRESS 1
#if IN_PROGRESS > 0

bool inside(int inI, int inJ, int left, int right) {
	return (left <= inI) && (inJ <= right);
}

bool intersects(int i, int j, int l, int r) {
	return (j >= l) && (i <= r);
}

struct SegmentTree {

		vector<ll> lazy;
		vector<ll> sum;
		vector<ll> m;

		SegmentTree(int n) {
			lazy.resize(4 * n);
			sum.resize(4 * n);
			m.resize(4 * n);
		}

		ll queryS(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return 0;
			}

			if (inside(i, j, l, r)) {
				return sum[vert] + lazy[vert] * (j - i + 1);
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = queryS(vert * 2, i, mid, l, r) + queryS(vert * 2 + 1, mid + 1, j, l, r);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		ll queryM(int vert, int i, int j, int l, int r) {
			if (!intersects(i, j, l, r)) {
				return LLONG_MAX;
			}

			if (inside(i, j, l, r)) {
				return m[vert] + lazy[vert];
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			ll ret = min(queryM(vert * 2, i, mid, l, r), queryM(vert * 2 + 1, mid + 1, j, l, r));

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

			return ret;
		}

		void update(int vert, int i, int j, int l, int r, ll a) {
			if (!intersects(i, j, l, r)) {
				return;
			}

			if (inside(i, j, l, r)) {
				lazy[vert] += a;
				return;
			}

			lazy[vert * 2] += lazy[vert];
			lazy[vert * 2 + 1] += lazy[vert];
			lazy[vert] = 0;

			int mid = (i + j) / 2;
			update(vert * 2, i, mid, l, r, a);
			update(vert * 2 + 1, mid + 1, j, l, r, a);

			sum[vert] = sum[vert * 2] + lazy[vert * 2] * (mid - i + 1) + sum[vert * 2 + 1] + lazy[vert * 2 + 1] * (j - (mid + 1) + 1);
			m[vert] = min(m[vert * 2] + lazy[vert * 2], m[vert * 2 + 1] + lazy[vert * 2 + 1]);

		}

};

SegmentTree tree(1000010);
set<int> weaponPowers;
vector<pair<int, int>> weapon;

vector<pair<int, int>> monsters;

multiset<int> above;
multiset<pair<int, int>> q;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	freopen("stress.in", "r", stdin);

	int n, m, p;
	cin >> n >> m >> p;

	for (int i = 0; i < n; i++) {
		int a, ca;
		cin >> a >> ca;
		weaponPowers.insert(a);
		weapon.push_back(make_pair(a, ca));
	}

	for (int i = 0; i < m; i++) {
		int b, cb;
		cin >> b >> cb;

		q.insert(make_pair(b, -cb));
		above.insert(cb);
	}
	//sort(weaponPowers.begin(), weaponPowers.end());
	for(int i = 0; i < 1000010; i++) {
		if(weaponPowers.find(i) == weaponPowers.end()) {
			tree.update(1, 0, 1000009, i, i, LLONG_MAX / 3);
		}
	}

	for (int i = 0; i < p; i++) {
		int attack, defense, coins;
		cin >> attack >> defense >> coins;
//		weaponPowers.push_back(attack);
		monsters.push_back(make_pair(attack, coins));
		q.insert(make_pair(defense, i));
	}

//	sort(weaponPowers.begin(), weaponPowers.end());
	for (auto a : weapon) {
	//	a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
		ll cost = tree.queryM(1, 0, 1000009, a.first, a.first);
		if(cost > a.second)
			tree.update(1, 0, 1000009, a.first, a.first, a.second-cost);
	}
//	for (auto a : monsters) {
//		a.first = *lower_bound(weaponPowers.begin(), weaponPowers.end(), a.first);
//	}

	ll ans = LLONG_MIN;

	while (!q.empty()) {
		auto a = *q.begin();
		q.erase(q.begin());
	/*
		cout << a.first << " " << a.second << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryM(1, 0, 1000009, i, i) << " ";
		}
		cout << endl;
		for (int i = 0; i < 20; i++) {
			cout << tree.queryS(1, 0, 1000009, i, i) << " ";
		}
		cout << endl;
		*/

		if (a.second < 0) {
			ans = max(ans, -tree.queryM(1, 0, 1000009, 0, 1000009) - *above.begin());
			above.erase(above.find(-a.second));

			//cout << -tree.queryM(1, 0, 1000009, 0, 1000009) << " " << *above.begin() << endl;
		} else {
			auto monster = monsters[a.second];
			tree.update(1, 0, 1000009, monster.first + 1, 1000009, -monster.second);
		}
	}

	cout << ans << "\n";

	return 0;
}
#endif


#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Ford(i,a,b) for(int i=a;i>=b;i--)
#define mp(a,b) make_pair(a,b)
using namespace std;
inline void minimize(int &x,int y) { x = min(x,y); }
inline void maximize(int &x,int y) { x = max(x,y); }
const int N=1000000+1067,oo=2e9,maxM=1000000+1;
int n,m,k;
int trai[N*4],phai[N*4],a[N],ca[N],b[N],cb[N],x[N],y[N],p[N],pos[N];
long long res=-oo;
long long it[4*N],lz[4*N];
vector<int> to[N],en[N];

void build(int x,int l,int r) {
    trai[x]=l;
    phai[x]=r;
    it[x]=-oo;
    if (l==r) return;
    int mid=(l+r)/2;
    build(x*2,l,mid);
    build(x*2+1,mid+1,r);
}

void down(int x) {
    int a=x*2;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    a++;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    lz[x]=0;
}

void update(int x,int l,int r,int c) {
    if (trai[x]>r||phai[x]<l) return;
    if (trai[x]>=l&&phai[x]<=r) {
        it[x]+=c;
        lz[x]+=c;
        return;
    }
    down(x);
    update(x*2,l,r,c);
    update(x*2+1,l,r,c);
    it[x]=max(it[x*2],it[x*2+1]);
}

bool comp(int c1,int c2) {
    return (b[c1]<b[c2]||(b[c1]==b[c2]&&cb[c1]<cb[c2]));
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen("dream_hyojooslh.txt","r",stdin);
    cin>>n>>m>>k;
    For(i,1,n) {
        cin>>a[i]>>ca[i];
        to[a[i]].push_back(i);
    }
    build(1,1,maxM);
    For(i,1,m) {
        cin>>b[i]>>cb[i];
        pos[i]=i;
    }
    sort(pos+1,pos+m+1,comp);
    For(i,1,m) if (i==1||b[pos[i]]!=b[pos[i-1]]) {
        update(1,b[pos[i]],b[pos[i]],oo-cb[pos[i]]);
    }

    For(i,1,k) {
        cin>>x[i]>>y[i]>>p[i];
        en[x[i]+1].push_back(i);
    }
    For(i,1,maxM) {
        for(auto j:en[i]) {
            update(1,y[j]+1,maxM,p[j]);
        }
        for(auto j:to[i]) {
            res=max(res,it[1]-ca[j]);
        }
    }
    cout<<res<<endl;
}


#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Ford(i,a,b) for(int i=a;i>=b;i--)
#define mp(a,b) make_pair(a,b)
using namespace std;
inline void minimize(int &x,int y) { x = min(x,y); }
inline void maximize(int &x,int y) { x = max(x,y); }
const int N=1000000+1067,oo=1e9,maxM=1000000;
int n,m,k;
int it[N*4],lz[N*4],trai[N*4],phai[N*4],a[N],ca[N],b[N],cb[N],x[N],y[N],p[N];
int res=-oo;
vector<int> to[N],en[N];

void build(int x,int l,int r) {
    trai[x]=l;
    phai[x]=r;
    it[x]=-oo;
    if (l==r) return;
    int mid=(l+r)/2;
    build(x*2,l,mid);
    build(x*2+1,mid+1,r);
}

void down(int x) {
    int a=x*2;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    a++;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    lz[x]=0;
}

void update(int x,int l,int r,int c) {
    if (trai[x]>r||phai[x]<l) return;
    if (trai[x]>=l&&phai[x]<=r) {
        it[x]+=c;
        lz[x]+=c;
        return;
    }
    down(x);
    update(x*2,l,r,c);
    update(x*2+1,l,r,c);
    it[x]=max(it[x*2],it[x*2+1]);
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen("dream_hyojooslh.txt","r",stdin);
    cin>>n>>m>>k;
    For(i,1,n) {
        cin>>a[i]>>ca[i];
        to[a[i]].push_back(i);
    }
    build(1,1,maxM);
    For(i,1,m) {
        cin>>b[i]>>cb[i];
        update(1,b[i],b[i],oo-cb[i]);
    }
    For(i,1,k) {
        cin>>x[i]>>y[i]>>p[i];
        en[x[i]+1].push_back(i);
    }
    //cout<<it[1]<<endl;
    For(i,1,maxM) {
        for(auto j:en[i]) {
            update(1,y[j]+1,maxM,p[j]);
        }
        for(auto j:to[i]) {
            res=max(res,it[1]-ca[j]);
        }
    }
    cout<<res<<endl;
}


#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Ford(i,a,b) for(int i=a;i>=b;i--)
#define mp(a,b) make_pair(a,b)
using namespace std;
inline void minimize(int &x,int y) { x = min(x,y); }
inline void maximize(int &x,int y) { x = max(x,y); }
const int N=1000000+1067,oo=2e9,maxM=1000000;
int n,m,k;
int trai[N*4],phai[N*4],a[N],ca[N],b[N],cb[N],x[N],y[N],p[N];
long long res=-2*oo;
long long it[4*N],lz[4*N];
vector<int> to[N],en[N];

void build(int x,int l,int r) {
    trai[x]=l;
    phai[x]=r;
    it[x]=-oo;
    if (l==r) return;
    int mid=(l+r)/2;
    build(x*2,l,mid);
    build(x*2+1,mid+1,r);
}

void down(int x) {
    int a=x*2;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    a++;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    lz[x]=0;
}

void update(int x,int l,int r,int c) {
    if (trai[x]>r||phai[x]<l) return;
    if (trai[x]>=l&&phai[x]<=r) {
        it[x]+=c;
        lz[x]+=c;
        return;
    }
    down(x);
    update(x*2,l,r,c);
    update(x*2+1,l,r,c);
    it[x]=max(it[x*2],it[x*2+1]);
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen("dream_hyojooslh.txt","r",stdin);
    cin>>n>>m>>k;
    For(i,1,n) {
        cin>>a[i]>>ca[i];
        to[a[i]].push_back(i);
    }
    build(1,1,maxM);
    For(i,1,m) {
        cin>>b[i]>>cb[i];
        update(1,b[i],b[i],oo-cb[i]);
    }
    For(i,1,k) {
        cin>>x[i]>>y[i]>>p[i];
        en[x[i]+1].push_back(i);
    }
    //cout<<it[1]<<endl;
    For(i,1,maxM) {
        for(auto j:en[i]) {
            update(1,y[j]+1,maxM,p[j]);
        }
        for(auto j:to[i]) {
            res=max(res,it[1]-ca[j]);
        }
    }
    cout<<res<<endl;
}


#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Ford(i,a,b) for(int i=a;i>=b;i--)
#define mp(a,b) make_pair(a,b)
using namespace std;
inline void minimize(int &x,int y) { x = min(x,y); }
inline void maximize(int &x,int y) { x = max(x,y); }
const int N=1000000+1067,oo=2e9,maxM=1000000+1;
int n,m,k;
int trai[N*4],phai[N*4],a[N],ca[N],b[N],cb[N],x[N],y[N],p[N];
long long res=-oo;
long long it[4*N],lz[4*N];
vector<int> to[N],en[N];

void build(int x,int l,int r) {
    trai[x]=l;
    phai[x]=r;
    it[x]=-oo;
    if (l==r) return;
    int mid=(l+r)/2;
    build(x*2,l,mid);
    build(x*2+1,mid+1,r);
}

void down(int x) {
    int a=x*2;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    a++;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    lz[x]=0;
}

void update(int x,int l,int r,int c) {
    if (trai[x]>r||phai[x]<l) return;
    if (trai[x]>=l&&phai[x]<=r) {
        it[x]+=c;
        lz[x]+=c;
        return;
    }
    down(x);
    update(x*2,l,r,c);
    update(x*2+1,l,r,c);
    it[x]=max(it[x*2],it[x*2+1]);
}

bool comp(int c1,int c2) {
    return (b[c1]<b[c2]||(b[c1]==b[c2]&&cb[c1]<cb[c2]));
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen("dream_hyojooslh.txt","r",stdin);
    cin>>n>>m>>k;
    For(i,1,n) {
        cin>>a[i]>>ca[i];
        to[a[i]].push_back(i);
    }
    build(1,1,maxM);
    For(i,1,m) {
        cin>>b[i]>>cb[i];
        pos[i]=i;
    }
    sort(pos+1,pos+m+1,comp);
    For(i,1,m) if (i==1||b[i]!=b[i-1]) {
        update(1,b[i],b[i],oo-cb[i]);
    }
    For(i,1,k) {
        cin>>x[i]>>y[i]>>p[i];
        en[x[i]+1].push_back(i);
    }
    For(i,1,maxM) {
        for(auto j:en[i]) {
            update(1,y[j]+1,maxM,p[j]);
        }
        for(auto j:to[i]) {
            res=max(res,it[1]-ca[j]);
        }
    }
    cout<<res<<endl;
}


#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Ford(i,a,b) for(int i=a;i>=b;i--)
#define mp(a,b) make_pair(a,b)
using namespace std;
inline void minimize(int &x,int y) { x = min(x,y); }
inline void maximize(int &x,int y) { x = max(x,y); }
const int N=1000000+1067,oo=2e9,maxM=1000000;
int n,m,k;
int trai[N*4],phai[N*4],a[N],ca[N],b[N],cb[N],x[N],y[N],p[N];
long long res=-oo;
long long it[4*N],lz[4*N];
vector<int> to[N],en[N];

void build(int x,int l,int r) {
    trai[x]=l;
    phai[x]=r;
    it[x]=-oo;
    if (l==r) return;
    int mid=(l+r)/2;
    build(x*2,l,mid);
    build(x*2+1,mid+1,r);
}

void down(int x) {
    int a=x*2;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    a++;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    lz[x]=0;
}

void update(int x,int l,int r,int c) {
    if (trai[x]>r||phai[x]<l) return;
    if (trai[x]>=l&&phai[x]<=r) {
        it[x]+=c;
        lz[x]+=c;
        return;
    }
    down(x);
    update(x*2,l,r,c);
    update(x*2+1,l,r,c);
    it[x]=max(it[x*2],it[x*2+1]);
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen("dream_hyojooslh.txt","r",stdin);
    cin>>n>>m>>k;
    For(i,1,n) {
        cin>>a[i]>>ca[i];
        to[a[i]].push_back(i);
    }
    build(1,1,maxM);
    For(i,1,m) {
        cin>>b[i]>>cb[i];
        update(1,b[i],b[i],oo-cb[i]);
    }
    For(i,1,k) {
        cin>>x[i]>>y[i]>>p[i];
        en[x[i]+1].push_back(i);
    }
    //cout<<it[1]<<endl;
    For(i,1,maxM) {
        for(auto j:en[i]) {
            update(1,y[j]+1,maxM,p[j]);
        }
        for(auto j:to[i]) {
            res=max(res,it[1]-ca[j]);
        }
    }
    cout<<res<<endl;
}


#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Ford(i,a,b) for(int i=a;i>=b;i--)
#define mp(a,b) make_pair(a,b)
using namespace std;
inline void minimize(int &x,int y) { x = min(x,y); }
inline void maximize(int &x,int y) { x = max(x,y); }
const int N=1000000+1067,oo=2e9,maxM=1000000+1;
int n,m,k;
int trai[N*4],phai[N*4],a[N],ca[N],b[N],cb[N],x[N],y[N],p[N];
long long res=-oo;
long long it[4*N],lz[4*N];
vector<int> to[N],en[N];

void build(int x,int l,int r) {
    trai[x]=l;
    phai[x]=r;
    it[x]=-oo;
    if (l==r) return;
    int mid=(l+r)/2;
    build(x*2,l,mid);
    build(x*2+1,mid+1,r);
}

void down(int x) {
    int a=x*2;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    a++;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    lz[x]=0;
}

void update(int x,int l,int r,int c) {
    if (trai[x]>r||phai[x]<l) return;
    if (trai[x]>=l&&phai[x]<=r) {
        it[x]+=c;
        lz[x]+=c;
        return;
    }
    down(x);
    update(x*2,l,r,c);
    update(x*2+1,l,r,c);
    it[x]=max(it[x*2],it[x*2+1]);
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen("dream_hyojooslh.txt","r",stdin);
    cin>>n>>m>>k;
    For(i,1,n) {
        cin>>a[i]>>ca[i];
        to[a[i]].push_back(i);
    }
    build(1,1,maxM);
    For(i,1,m) {
        cin>>b[i]>>cb[i];
        update(1,b[i],b[i],oo-cb[i]);
    }
    For(i,1,k) {
        cin>>x[i]>>y[i]>>p[i];
        en[x[i]+1].push_back(i);
    }
    //cout<<it[1]<<endl;
    For(i,1,maxM) {
        for(auto j:en[i]) {
            update(1,y[j]+1,maxM,p[j]);
        }
        for(auto j:to[i]) {
            res=max(res,it[1]-ca[j]);
        }
    }
    cout<<res<<endl;
}


#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Ford(i,a,b) for(int i=a;i>=b;i--)
#define mp(a,b) make_pair(a,b)
using namespace std;
inline void minimize(int &x,int y) { x = min(x,y); }
inline void maximize(int &x,int y) { x = max(x,y); }
const int N=1000000+1067,oo=2e9,maxM=1000000+1;
int n,m,k;
int trai[N*4],phai[N*4],a[N],ca[N],b[N],cb[N],x[N],y[N],p[N],pos[N];
long long res=-oo;
long long it[4*N],lz[4*N];
vector<int> to[N],en[N];

void build(int x,int l,int r) {
    trai[x]=l;
    phai[x]=r;
    it[x]=-oo;
    if (l==r) return;
    int mid=(l+r)/2;
    build(x*2,l,mid);
    build(x*2+1,mid+1,r);
}

void down(int x) {
    int a=x*2;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    a++;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    lz[x]=0;
}

void update(int x,int l,int r,int c) {
    if (trai[x]>r||phai[x]<l) return;
    if (trai[x]>=l&&phai[x]<=r) {
        cout<<trai[x]<<" "<<it[x]<<" "<<c<<endl;
        it[x]+=c;
        lz[x]+=c;
        return;
    }
    down(x);
    update(x*2,l,r,c);
    update(x*2+1,l,r,c);
    it[x]=max(it[x*2],it[x*2+1]);
}

bool comp(int c1,int c2) {
    return (b[c1]<b[c2]||(b[c1]==b[c2]&&cb[c1]<cb[c2]));
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen("dream_hyojooslh.txt","r",stdin);
    cin>>n>>m>>k;
    For(i,1,n) {
        cin>>a[i]>>ca[i];
        to[a[i]].push_back(i);
    }
    build(1,1,maxM);
    For(i,1,m) {
        cin>>b[i]>>cb[i];
        pos[i]=i;
    }
    sort(pos+1,pos+m+1,comp);
    For(i,1,m) if (i==1||b[pos[i]]!=b[pos[i-1]]) {
        update(1,b[pos[i]],b[pos[i]],oo-cb[pos[i]]);
    }

    For(i,1,k) {
        cin>>x[i]>>y[i]>>p[i];
        en[x[i]+1].push_back(i);
    }
    For(i,1,maxM) {
        for(auto j:en[i]) {
            update(1,y[j]+1,maxM,p[j]);
        }
        for(auto j:to[i]) {
            res=max(res,it[1]-ca[j]);
        }
    }
    cout<<res<<endl;
}


#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Ford(i,a,b) for(int i=a;i>=b;i--)
#define mp(a,b) make_pair(a,b)
using namespace std;
inline void minimize(int &x,int y) { x = min(x,y); }
inline void maximize(int &x,int y) { x = max(x,y); }
const int N=1000000+1067,oo=2e9,maxM=1000000+1;
int n,m,k;
int trai[N*4],phai[N*4],a[N],ca[N],b[N],cb[N],x[N],y[N],p[N],pos[N];
long long res=-oo;
long long it[4*N],lz[4*N];
vector<int> to[N],en[N];

void build(int x,int l,int r) {
    trai[x]=l;
    phai[x]=r;
    it[x]=-oo;
    if (l==r) return;
    int mid=(l+r)/2;
    build(x*2,l,mid);
    build(x*2+1,mid+1,r);
}

void down(int x) {
    int a=x*2;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    a++;
    it[a]+=lz[x];
    lz[a]+=lz[x];
    lz[x]=0;
}

void update(int x,int l,int r,int c) {
    if (trai[x]>r||phai[x]<l) return;
    if (trai[x]>=l&&phai[x]<=r) {
        it[x]+=c;
        lz[x]+=c;
        return;
    }
    down(x);
    update(x*2,l,r,c);
    update(x*2+1,l,r,c);
    it[x]=max(it[x*2],it[x*2+1]);
}

bool comp(int c1,int c2) {
    return (b[c1]<b[c2]||(b[c1]==b[c2]&&cb[c1]<cb[c2]));
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen("dream_hyojooslh.txt","r",stdin);
    cin>>n>>m>>k;
    For(i,1,n) {
        cin>>a[i]>>ca[i];
        to[a[i]].push_back(i);
    }
    build(1,1,maxM);
    For(i,1,m) {
        cin>>b[i]>>cb[i];
        pos[i]=i;
    }
    sort(pos+1,pos+m+1,comp);
    For(i,1,m) if (i==1||b[i]!=b[i-1]) {
        update(1,b[i],b[i],oo-cb[i]);
    }
    For(i,1,k) {
        cin>>x[i]>>y[i]>>p[i];
        en[x[i]+1].push_back(i);
    }
    For(i,1,maxM) {
        for(auto j:en[i]) {
            update(1,y[j]+1,maxM,p[j]);
        }
        for(auto j:to[i]) {
            res=max(res,it[1]-ca[j]);
        }
    }
    cout<<res<<endl;
}


/**
 * @author khokharnikunj8
 */

#pragma GCC optimize(2)
#pragma GCC optimize(3)

#include <bits/stdc++.h>

using namespace std;

inline int read() {
    int x = 0, neg = 1;
    char op = getchar();
    while (!isdigit(op)) {
        if (op == '-') neg = -1;
        op = getchar();
    }
    while (isdigit(op)) {
        x = 10 * x + op - '0';
        op = getchar();
    }
    return neg * x;
}

inline void print(int x) {
    if (x < 0) {
        putchar('-');
        x = -x;
    }
    if (x >= 10) print(x / 10);
    putchar(x % 10 + '0');
}

struct ele {
    int x, val;

    friend bool operator<(const ele &a, const ele &b) {
        return a.x < b.x;
    }
} attack[100005 << 1], defense[100005 << 1];

struct pp {
    int x, y, z;

    friend bool operator<(const pp &a, const pp &b) {
        return a.x < b.x;
    }
} monster[100005 << 1];

int tempDefense[1000001];

struct SegmentTree {
public:
    long long val[1000005 << 2];
    int tag[1000005 << 2];

    void pu(int u) {
        val[u] = max(val[u << 1], val[(u << 1 | 1)]);
    }

    void pushdown(int u) {
        if (tag[u]) {
            val[u << 1] += tag[u], tag[u << 1] += tag[u];
            val[(u << 1 | 1)] += tag[u], tag[(u << 1 | 1)] += tag[u];
            tag[u] = 0;
        }
    }

    void build(int u, int l, int r) {
        if (l == r) {
            if (!tempDefense[l]) {
                val[u] = -1e18;
            } else {
                val[u] = -tempDefense[l];
            }
            return;
        }
        int mid = l + r >> 1;
        build(u << 1, l, mid);
        build((u << 1 | 1), mid + 1, r);
        pu(u);
    }

    void update(int u, int l, int r, int ql, int qr, int x) {
        if (l > r || ql > qr) {
            return;
        }
        if (ql <= l && r <= qr) {
            tag[u] += x, val[u] += x;
            return;
        }
        pushdown(u);
        int mid = l + r >> 1;
        if (ql <= mid) update(u << 1, l, mid, ql, qr, x);
        if (qr > mid) update((u << 1 | 1), mid + 1, r, ql, qr, x);
        pu(u);
    }
};

int main() {
    int n, m, p;
    n = read();
    m = read();
    p = read();
    for (int i = 0; i < n; i++)attack[i].x = read(), attack[i].val = read();
    for (int i = 0; i < m; i++)defense[i].x = read(), defense[i].val = read();
    for (int i = 0; i < p; i++) monster[i].x = read(), monster[i].y = read(), monster[i].z = read();
    sort(attack, attack + n);
    sort(defense, defense + m);
    sort(monster, monster + p);
    for (int i = 0; i < m; i++) {
        if (!tempDefense[defense[i].x] || defense[i].val < tempDefense[defense[i].x]) {
            tempDefense[defense[i].x] = defense[i].val;
        }
    }
    SegmentTree smt;
    smt.build(1, 1, 1000000);
    int pointerC = 0;
    long long ans = LLONG_MIN;
    for (int i = 0; i < n; i++) {
        while (pointerC < p && monster[pointerC].x < attack[i].x) {
            smt.update(1, 1, 1000000, monster[pointerC].y + 1, 1000000,
                       monster[pointerC].z);
            pointerC++;
        }
        ans = max(ans, smt.val[1] - attack[i].val);
    }
    printf("%lld\n", ans);
    return 0;
}


/**
 * @author khokharnikunj8
 */

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

#include <bits/stdc++.h>

using namespace std;

struct segment {
    int N;
    int *t;
    int *d;
    int h;

    segment(int N, vector<int> &b) {
        this->N = N;
        t = new int[N << 1];
        for (int i = 0; i < N << 1; i++) t[i] = 0;
        d = new int[N];
        for (int i = 0; i < N; i++) d[i] = 0;
        h = sizeof(int) * 8 - __builtin_clz(N);
        for (int i = 0; i < N; i++) t[i + N] = -b[i];
        build1();
    }

     void apply(int p, int value) {
        t[p] += value;
        if (p < N) d[p] += value;
    }

     void build1() {
        for (int i = N - 1; i > 0; --i) t[i] = max(t[i << 1], t[i << 1 | 1]);
    }

     void build(int p) {
        while (p > 1) p >>= 1, t[p] = max(t[p << 1], t[p << 1 | 1]) + d[p];
    }

     void push(int p) {
        for (int s = h; s > 0; --s) {
            int i = p >> s;
            if (d[i] != 0) {
                apply(i << 1, d[i]);
                apply(i << 1 | 1, d[i]);
                d[i] = 0;
            }
        }
    }

     void inc(int l, int r, int value) {
        l += N, r += N;
        int l0 = l, r0 = r;
        for (; l < r; l >>= 1, r >>= 1) {
            if (l & 1) apply(l++, value);
            if (r & 1) apply(--r, value);
        }
        build(l0);
        build(r0 - 1);
    }

     int query(int l, int r) {
        l += N, r += N;
        push(l);
        push(r - 1);
        int res = -2e9;
        for (; l < r; l >>= 1, r >>= 1) {
            if (l & 1) res = max(res, t[l++]);
            if (r & 1) res = max(t[--r], res);
        }
        return res;
    }
} ;

class CWorldOfDarkraftBattleForAzathoth {
public:

    void solve(std::istream &in, std::ostream &out) {
        int n, m, p;
        in >> n >> m >> p;
        vector<pair<int, int>> attack(n, {-1, -1});
        vector<pair<int, int>> defense(m, {-1, -1});
        vector<pair<int, pair<int, int>>> monster(p, {-1, {-1, -1}});
        for (int i = 0; i < n; i++) in >> attack[i].first >> attack[i].second;
        for (int i = 0; i < m; i++) in >> defense[i].first >> defense[i].second;
        for (int i = 0; i < p; i++) in >> monster[i].first >> monster[i].second.first >> monster[i].second.second;
        sort(attack.begin(), attack.end());
        sort(defense.begin(), defense.end());
        sort(monster.begin(), monster.end());
        vector<int> b(1000005, 2e9);
        for (int i = 0; i < m; i++) {
            if (defense[i].second < b[defense[i].first]) {
                b[defense[i].first] = defense[i].second;
            }
        }
        segment st(1000005, b);
        int pointerC = 0;
        int ans = INT32_MIN;
        for (int i = 0; i < n; i++) {
            while (pointerC < p && monster[pointerC].first < attack[i].first) {
                st.inc(monster[pointerC].second.first + 1, 1000000 + 1,
                    monster[pointerC].second.second);
                pointerC++;
            }
            ans = max(ans, st.query(0, 1000001) - attack[i].second);
        }
        out << ans << "\n";
    }

};

int main() {
    CWorldOfDarkraftBattleForAzathoth solver;
    std::ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    std::istream &in(std::cin);
    std::ostream &out(std::cout);
    solver.solve(in, out);
    return 0;
}


/**
 * @author khokharnikunj8
 */

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

#include <bits/stdc++.h>

#ifndef CM_SPARSETABLE_HPP
#define CM_SPARSETABLE_HPP

template<typename T, class F = std::function<T(const T &, const T &)>>
class SparseTable {
public:
    int n;
    std::vector<std::vector<T>> mat;
    F func;

    SparseTable(const std::vector<T> &a, const F &f) : func(f) {
        n = static_cast<int>(a.size());
        int max_log = 32 - __builtin_clz(n);
        mat.resize(max_log);
        mat[0] = a;
        for (int j = 1; j < max_log; j++) {
            mat[j].resize(n - (1 << j) + 1);
            for (int i = 0; i <= n - (1 << j); i++) {
                mat[j][i] = func(mat[j - 1][i], mat[j - 1][i + (1 << (j - 1))]);
            }
        }
    }

    T get(int from, int to) const {
        assert(0 <= from && from <= to && to <= n - 1);
        int lg = 32 - __builtin_clz(to - from + 1) - 1;
        return func(mat[lg][from], mat[lg][to - (1 << lg) + 1]);
    }
};

#endif //CM_SPARSETABLE_HPP

#ifndef CM_BST_HPP
#define CM_BST_HPP

template<class T, class T1>
class BST {
private:
    class Node {
    public :
        T data;
        Node *leftChild;
        Node *rightChild;
        T1 leftCount, rightCount, height, totalCount;

        Node(T data) {
            this->data = data;
            this->leftChild = NULL;
            this->rightChild = NULL;
            this->leftCount = 0;
            this->rightCount = 0;
            this->height = 1;
            this->totalCount = 1;
        }

        Node(T data, T1 totalCount) {
            this->data = data;
            this->leftChild = NULL;
            this->rightChild = NULL;
            this->leftCount = 0;
            this->rightCount = 0;
            this->height = 1;
            this->totalCount = totalCount;
        }
    };

    Node *rootNode;
    Node *temporaryNode1;
    Node *temporaryNode2;
    T1 treeSize;
    bool multiCount;

    T1 getDiff(Node *temp) {
        if (temp == NULL) return 0;
        return getheight(temp->leftChild) - getheight(temp->rightChild);
    }

    T1 getheight(Node *temp) {
        if (temp == NULL) return 0;
        return temp->height;
    }

    Node *rightRotate(Node *temp) {
        temporaryNode1 = temp->leftChild;
        temporaryNode2 = temporaryNode1->rightChild;
        temporaryNode1->rightChild = temp;
        temp->leftChild = temporaryNode2;
        //height updation
        temp->height = std::max(getheight(temp->leftChild), getheight(temp->rightChild)) + 1;
        temporaryNode1->height =
                std::max(getheight(temporaryNode1->leftChild), getheight(temporaryNode1->rightChild)) + 1;
        //totalCount updation
        if (temp->leftChild != NULL)
            temp->leftCount = temp->leftChild->leftCount + temp->leftChild->rightCount + temp->leftChild->totalCount;
        else temp->leftCount = 0;
        if (temp->rightChild != NULL)
            temp->rightCount =
                    temp->rightChild->leftCount + temp->rightChild->rightCount + temp->rightChild->totalCount;
        else temp->rightCount = 0;
        if (temporaryNode1->leftChild != NULL)
            temporaryNode1->leftCount =
                    temporaryNode1->leftChild->leftCount + temporaryNode1->leftChild->rightCount +
                    temporaryNode1->leftChild->totalCount;
        else temporaryNode1->leftCount = 0;
        if (temporaryNode1->rightChild != NULL)
            temporaryNode1->rightCount =
                    temporaryNode1->rightChild->leftCount + temporaryNode1->rightChild->rightCount +
                    temporaryNode1->rightChild->totalCount;
        else temporaryNode1->rightCount = 0;
        return temporaryNode1;
    }

    Node *leftRotate(Node *temp) {
        temporaryNode1 = temp->rightChild;
        temporaryNode2 = temporaryNode1->leftChild;
        temporaryNode1->leftChild = temp;
        temp->rightChild = temporaryNode2;
        //height updation
        temp->height = std::max(getheight(temp->leftChild), getheight(temp->rightChild)) + 1;
        temporaryNode1->height =
                std::max(getheight(temporaryNode1->leftChild), getheight(temporaryNode1->rightChild)) + 1;
        //totalCount updation
        if (temp->leftChild != NULL)
            temp->leftCount = temp->leftChild->leftCount + temp->leftChild->rightCount + temp->leftChild->totalCount;
        else temp->leftCount = 0;
        if (temp->rightChild != NULL)
            temp->rightCount =
                    temp->rightChild->leftCount + temp->rightChild->rightCount + temp->rightChild->totalCount;
        else temp->rightCount = 0;
        if (temporaryNode1->leftChild != NULL)
            temporaryNode1->leftCount =
                    temporaryNode1->leftChild->leftCount + temporaryNode1->leftChild->rightCount +
                    temporaryNode1->leftChild->totalCount;
        else temporaryNode1->leftCount = 0;
        if (temporaryNode1->rightChild != NULL)
            temporaryNode1->rightCount =
                    temporaryNode1->rightChild->leftCount + temporaryNode1->rightChild->rightCount +
                    temporaryNode1->rightChild->totalCount;
        else temporaryNode1->rightCount = 0;
        return temporaryNode1;
    }

    Node *remove(Node *temp, T &data, T1 totalCount) {
        if (temp == NULL) return temp;
        if (data < temp->data) temp->leftChild = remove(temp->leftChild, data, totalCount);
        else if (data > temp->data) temp->rightChild = remove(temp->rightChild, data, totalCount);
        else {
            if (multiCount && totalCount < temp->totalCount && temp->totalCount > 1) {
                treeSize -= totalCount;
                temp->totalCount -= totalCount;
            } else {
                treeSize -= temp->totalCount;
                if (temp->leftChild == NULL && temp->rightChild == NULL) return NULL;
                else if (temp->leftChild == NULL) return temp->rightChild;
                else if (temp->rightChild == NULL) return temp->leftChild;
                else {
                    temporaryNode1 = minValue(temp->rightChild);
                    temp->data = temporaryNode1->data;
                    temp->totalCount = temporaryNode1->totalCount;
                    temp->rightChild = remove(temp->rightChild, temporaryNode1->data, temporaryNode1->totalCount);
                    treeSize += temp->totalCount;
                }
            }
        }
        // for leftside and rightside count
        if (temp->leftChild != NULL)
            temp->leftCount = temp->leftChild->leftCount + temp->leftChild->rightCount + temp->leftChild->totalCount;
        else temp->leftCount = 0;
        if (temp->rightChild != NULL)
            temp->rightCount =
                    temp->rightChild->leftCount + temp->rightChild->rightCount + temp->rightChild->totalCount;
        else temp->rightCount = 0;

        temp->height = std::max(getheight(temp->leftChild), getheight(temp->rightChild)) + 1;
        //Balancing
        T1 diff = getDiff(temp);
        if (diff > 1) {
            if (getDiff(temp->leftChild) >= 0) {
                temp = rightRotate(temp);
            } else {
                temp->leftChild = leftRotate(temp->leftChild);
                temp = rightRotate(temp);
            }
        } else if (diff < -1) {
            if (getDiff(temp->rightChild) <= 0) {
                temp = leftRotate(temp);
            } else {
                temp->rightChild = rightRotate(temp->rightChild);
                temp = leftRotate(temp);
            }
        }
        return temp;
    }

    Node *minValue(Node *temp) {
        temporaryNode1 = temp;
        while (temporaryNode1->leftChild != NULL) temporaryNode1 = temporaryNode1->leftChild;
        return temporaryNode1;
    }

    Node *insert(Node *temp, T &data, T1 totalCount) {
        if (temp == NULL) {
            if (multiCount) {
                treeSize += totalCount;
                return new Node(data, totalCount);
            } else {
                treeSize++;
                return new Node(data);
            }
        }
        if (data < temp->data) temp->leftChild = insert(temp->leftChild, data, totalCount);
        else if (data > temp->data) temp->rightChild = insert(temp->rightChild, data, totalCount);
        else if (multiCount) {
            treeSize += totalCount;
            temp->totalCount += totalCount;
        }
        // for __leftside and rightCount totalCount
        if (temp->leftChild != NULL)
            temp->leftCount = temp->leftChild->leftCount + temp->leftChild->rightCount + temp->leftChild->totalCount;
        else temp->leftCount = 0;
        if (temp->rightChild != NULL)
            temp->rightCount =
                    temp->rightChild->leftCount + temp->rightChild->rightCount + temp->rightChild->totalCount;
        else temp->rightCount = 0;
        temp->height = std::max(getheight(temp->leftChild), getheight(temp->rightChild)) + 1;
        //Balancing
        T1 diff = getDiff(temp);
        if (diff > 1) {
            if (data < temp->leftChild->data) {
                temp = rightRotate(temp);
            } else if (data > temp->leftChild->data) {
                temp->leftChild = leftRotate(temp->leftChild);
                temp = rightRotate(temp);
            }
        } else if (diff < -1) {
            if (data > (temp->rightChild->data)) {
                temp = leftRotate(temp);
            } else if (data < temp->rightChild->data) {
                temp->rightChild = rightRotate(temp->rightChild);
                temp = leftRotate(temp);
            }
        }
        return temp;
    }

public :

    BST() {
        rootNode = NULL;
        treeSize = 0;
        multiCount = false;
    }

    BST(bool multiCount) {
        rootNode = NULL;
        treeSize = 0;
        this->multiCount = multiCount;
    }

    T1 lower_bound(T data) {
        temporaryNode1 = rootNode;
        T1 index = 0;
        while (temporaryNode1 != NULL) {
            if (data < temporaryNode1->data) {
                temporaryNode1 = temporaryNode1->leftChild;
            } else if (data > temporaryNode1->data) {
                index += (temporaryNode1->totalCount + temporaryNode1->leftCount);
                temporaryNode1 = temporaryNode1->rightChild;
            } else {
                index += (temporaryNode1->leftCount);
                break;
            }
        }
        return index;
    }

    T get(T1 index) {
        temporaryNode1 = rootNode;
        T1 current = 0;
        while (temporaryNode1 != NULL) {
            if (temporaryNode1->leftChild == NULL) {
                if (temporaryNode1->totalCount + current > index) return temporaryNode1->data;
                else {
                    current += temporaryNode1->totalCount;
                    temporaryNode1 = temporaryNode1->rightChild;
                }
            } else {
                if (current + temporaryNode1->leftCount > index) temporaryNode1 = temporaryNode1->leftChild;
                else if (current + temporaryNode1->leftCount + temporaryNode1->totalCount > index)
                    return temporaryNode1->data;
                else {
                    current += temporaryNode1->totalCount + temporaryNode1->leftCount;
                    temporaryNode1 = temporaryNode1->rightChild;
                }
            }
        }
        assert("Not possible");
    }

    void insert(T data, T1 totalCount = 1) {
        if (totalCount > 0) rootNode = insert(rootNode, data, totalCount);
    }

    void remove(T data, T1 totalCount = 1) {
        if (totalCount > 0) rootNode = remove(rootNode, data, totalCount);
    }

    T1 getCount(T data) {
        temporaryNode1 = rootNode;
        while (temporaryNode1 != NULL) {
            if (data < temporaryNode1->data) temporaryNode1 = temporaryNode1->leftChild;
            else if (data > temporaryNode1->data) temporaryNode1 = temporaryNode1->rightChild;
            else return temporaryNode1->totalCount;
        }
        return 0;
    }

    bool contains(T data) {
        temporaryNode1 = rootNode;
        while (temporaryNode1 != NULL) {
            if (data == temporaryNode1->data) return true;
            else if (data < temporaryNode1->data) temporaryNode1 = temporaryNode1->leftChild;
            else temporaryNode1 = temporaryNode1->rightChild;
        }
        return false;
    }

    T1 size() {
        return this->treeSize;
    }
};

#endif //CM_BST_HPP

using namespace std;

class CWorldOfDarkraftBattleForAzathoth {
public:
    vector<long long> BIT;

    void update(int x, long long delta) {
        for (; x <= 1000000; x += x & -x)
            BIT[x] += delta;
    }

    long long query(int x) {

        long long sum = 0;
        for (; x > 0; x -= x & -x)
            sum += BIT[x];
        return sum;
    }

    void solve(std::istream &in, std::ostream &out) {
        int n, m, p;
        in >> n >> m >> p;
        BIT.resize(1000005, 0);
        vector<pair<int, int>> attack(n, {-1, -1});
        vector<pair<int, int>> defense(m, {-1, -1});
        for (int i = 0; i < n; i++) in >> attack[i].first >> attack[i].second;
        for (int i = 0; i < m; i++) in >> defense[i].first >> defense[i].second;
        vector<pair<int, pair<int, int>>> monster(p, {-1, {-1, -1}});
        for (int i = 0; i < p; i++) in >> monster[i].first >> monster[i].second.first >> monster[i].second.second;
        sort(attack.begin(), attack.end());
        sort(monster.begin(), monster.end());
        vector<long long> minD(1000005, LLONG_MAX / 10);
        BST<int, int> bst(false);
        for (int i = 0; i < m; i++) minD[defense[i].first] = min(minD[defense[i].first], (long long) defense[i].second);
        for (int i = 0; i < m; i++) bst.insert(defense[i].first);
        for (int i = 1000003; i >= 0; i--) {
            minD[i] = min(minD[i + 1], minD[i]);
        }
        int pointerC = 0;
        long long ans = LLONG_MIN;
        long long sumMax = 0;
        int minB = 1000001;
        int maxB = 0;
        for (int i = 0; i < n; i++) {
            while (pointerC < p && monster[pointerC].first < attack[i].first) {
                update(monster[pointerC].second.first, monster[pointerC].second.second);
                minB = min(minB, monster[pointerC].second.first);
                maxB = max(maxB, monster[pointerC].second.first);
                pointerC++;
            }

            {
                int temp = -1;
                int index = bst.lower_bound(minB + 1);
                if (index != bst.size()) temp = bst.get(index);
                if (temp != -1)ans = max(ans, 0ll - attack[i].second - minD[temp] + query(temp - 1));
            }

            {
                int temp = -1;
                int index = bst.lower_bound(minB);
                if (index != bst.size()) temp = bst.get(index);
                if (temp != -1)ans = max(ans, 0ll - attack[i].second - minD[temp] + query(temp - 1));
            }

            {
                int temp = -1;
                int index = bst.lower_bound(minB - 1);
                if (index != bst.size()) temp = bst.get(index);
                if (temp != -1)ans = max(ans, 0ll - attack[i].second - minD[temp] + query(temp - 1));
            }

            {
                int temp = -1;
                int index = bst.lower_bound(maxB + 1);
                if (index != bst.size()) temp = bst.get(index);
                if (temp != -1)ans = max(ans, 0ll - attack[i].second - minD[temp] + query(temp - 1));
            }

            {
                int temp = -1;
                int index = bst.lower_bound(maxB);
                if (index != bst.size()) temp = bst.get(index);
                if (temp != -1) ans = max(ans, 0ll - attack[i].second - minD[temp] + query(temp - 1));
            }

            {
                int temp = -1;
                int index = bst.lower_bound(maxB - 1);
                if (index != bst.size()) temp = bst.get(index);
                if (temp != -1) ans = max(ans, 0ll - attack[i].second - minD[temp] + query(temp - 1));
            }
        }
        out << ans << "\n";
    }
};

int main() {
    CWorldOfDarkraftBattleForAzathoth solver;
    std::ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    std::istream &in(std::cin);
    std::ostream &out(std::cout);
    solver.solve(in, out);
    return 0;
}


/**
 * @author khokharnikunj8
 */

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

#include <bits/stdc++.h>

#ifndef CM_BST_HPP
#define CM_BST_HPP

template<class T, class T1>
class BST {
private:
    class Node {
    public :
        T data;
        Node *leftChild;
        Node *rightChild;
        T1 leftCount, rightCount, height, totalCount;

        Node(T data) {
            this->data = data;
            this->leftChild = NULL;
            this->rightChild = NULL;
            this->leftCount = 0;
            this->rightCount = 0;
            this->height = 1;
            this->totalCount = 1;
        }

        Node(T data, T1 totalCount) {
            this->data = data;
            this->leftChild = NULL;
            this->rightChild = NULL;
            this->leftCount = 0;
            this->rightCount = 0;
            this->height = 1;
            this->totalCount = totalCount;
        }
    };

    Node *rootNode;
    Node *temporaryNode1;
    Node *temporaryNode2;
    T1 treeSize;
    bool multiCount;

    T1 getDiff(Node *temp) {
        if (temp == NULL) return 0;
        return getheight(temp->leftChild) - getheight(temp->rightChild);
    }

    T1 getheight(Node *temp) {
        if (temp == NULL) return 0;
        return temp->height;
    }

    Node *rightRotate(Node *temp) {
        temporaryNode1 = temp->leftChild;
        temporaryNode2 = temporaryNode1->rightChild;
        temporaryNode1->rightChild = temp;
        temp->leftChild = temporaryNode2;
        //height updation
        temp->height = std::max(getheight(temp->leftChild), getheight(temp->rightChild)) + 1;
        temporaryNode1->height =
                std::max(getheight(temporaryNode1->leftChild), getheight(temporaryNode1->rightChild)) + 1;
        //totalCount updation
        if (temp->leftChild != NULL)
            temp->leftCount = temp->leftChild->leftCount + temp->leftChild->rightCount + temp->leftChild->totalCount;
        else temp->leftCount = 0;
        if (temp->rightChild != NULL)
            temp->rightCount =
                    temp->rightChild->leftCount + temp->rightChild->rightCount + temp->rightChild->totalCount;
        else temp->rightCount = 0;
        if (temporaryNode1->leftChild != NULL)
            temporaryNode1->leftCount =
                    temporaryNode1->leftChild->leftCount + temporaryNode1->leftChild->rightCount +
                    temporaryNode1->leftChild->totalCount;
        else temporaryNode1->leftCount = 0;
        if (temporaryNode1->rightChild != NULL)
            temporaryNode1->rightCount =
                    temporaryNode1->rightChild->leftCount + temporaryNode1->rightChild->rightCount +
                    temporaryNode1->rightChild->totalCount;
        else temporaryNode1->rightCount = 0;
        return temporaryNode1;
    }

    Node *leftRotate(Node *temp) {
        temporaryNode1 = temp->rightChild;
        temporaryNode2 = temporaryNode1->leftChild;
        temporaryNode1->leftChild = temp;
        temp->rightChild = temporaryNode2;
        //height updation
        temp->height = std::max(getheight(temp->leftChild), getheight(temp->rightChild)) + 1;
        temporaryNode1->height =
                std::max(getheight(temporaryNode1->leftChild), getheight(temporaryNode1->rightChild)) + 1;
        //totalCount updation
        if (temp->leftChild != NULL)
            temp->leftCount = temp->leftChild->leftCount + temp->leftChild->rightCount + temp->leftChild->totalCount;
        else temp->leftCount = 0;
        if (temp->rightChild != NULL)
            temp->rightCount =
                    temp->rightChild->leftCount + temp->rightChild->rightCount + temp->rightChild->totalCount;
        else temp->rightCount = 0;
        if (temporaryNode1->leftChild != NULL)
            temporaryNode1->leftCount =
                    temporaryNode1->leftChild->leftCount + temporaryNode1->leftChild->rightCount +
                    temporaryNode1->leftChild->totalCount;
        else temporaryNode1->leftCount = 0;
        if (temporaryNode1->rightChild != NULL)
            temporaryNode1->rightCount =
                    temporaryNode1->rightChild->leftCount + temporaryNode1->rightChild->rightCount +
                    temporaryNode1->rightChild->totalCount;
        else temporaryNode1->rightCount = 0;
        return temporaryNode1;
    }

    Node *remove(Node *temp, T &data, T1 totalCount) {
        if (temp == NULL) return temp;
        if (data < temp->data) temp->leftChild = remove(temp->leftChild, data, totalCount);
        else if (data > temp->data) temp->rightChild = remove(temp->rightChild, data, totalCount);
        else {
            if (multiCount && totalCount < temp->totalCount && temp->totalCount > 1) {
                treeSize -= totalCount;
                temp->totalCount -= totalCount;
            } else {
                treeSize -= temp->totalCount;
                if (temp->leftChild == NULL && temp->rightChild == NULL) return NULL;
                else if (temp->leftChild == NULL) return temp->rightChild;
                else if (temp->rightChild == NULL) return temp->leftChild;
                else {
                    temporaryNode1 = minValue(temp->rightChild);
                    temp->data = temporaryNode1->data;
                    temp->totalCount = temporaryNode1->totalCount;
                    temp->rightChild = remove(temp->rightChild, temporaryNode1->data, temporaryNode1->totalCount);
                    treeSize += temp->totalCount;
                }
            }
        }
        // for leftside and rightside count
        if (temp->leftChild != NULL)
            temp->leftCount = temp->leftChild->leftCount + temp->leftChild->rightCount + temp->leftChild->totalCount;
        else temp->leftCount = 0;
        if (temp->rightChild != NULL)
            temp->rightCount =
                    temp->rightChild->leftCount + temp->rightChild->rightCount + temp->rightChild->totalCount;
        else temp->rightCount = 0;

        temp->height = std::max(getheight(temp->leftChild), getheight(temp->rightChild)) + 1;
        //Balancing
        T1 diff = getDiff(temp);
        if (diff > 1) {
            if (getDiff(temp->leftChild) >= 0) {
                temp = rightRotate(temp);
            } else {
                temp->leftChild = leftRotate(temp->leftChild);
                temp = rightRotate(temp);
            }
        } else if (diff < -1) {
            if (getDiff(temp->rightChild) <= 0) {
                temp = leftRotate(temp);
            } else {
                temp->rightChild = rightRotate(temp->rightChild);
                temp = leftRotate(temp);
            }
        }
        return temp;
    }

    Node *minValue(Node *temp) {
        temporaryNode1 = temp;
        while (temporaryNode1->leftChild != NULL) temporaryNode1 = temporaryNode1->leftChild;
        return temporaryNode1;
    }

    Node *insert(Node *temp, T &data, T1 totalCount) {
        if (temp == NULL) {
            if (multiCount) {
                treeSize += totalCount;
                return new Node(data, totalCount);
            } else {
                treeSize++;
                return new Node(data);
            }
        }
        if (data < temp->data) temp->leftChild = insert(temp->leftChild, data, totalCount);
        else if (data > temp->data) temp->rightChild = insert(temp->rightChild, data, totalCount);
        else if (multiCount) {
            treeSize += totalCount;
            temp->totalCount += totalCount;
        }
        // for __leftside and rightCount totalCount
        if (temp->leftChild != NULL)
            temp->leftCount = temp->leftChild->leftCount + temp->leftChild->rightCount + temp->leftChild->totalCount;
        else temp->leftCount = 0;
        if (temp->rightChild != NULL)
            temp->rightCount =
                    temp->rightChild->leftCount + temp->rightChild->rightCount + temp->rightChild->totalCount;
        else temp->rightCount = 0;
        temp->height = std::max(getheight(temp->leftChild), getheight(temp->rightChild)) + 1;
        //Balancing
        T1 diff = getDiff(temp);
        if (diff > 1) {
            if (data < temp->leftChild->data) {
                temp = rightRotate(temp);
            } else if (data > temp->leftChild->data) {
                temp->leftChild = leftRotate(temp->leftChild);
                temp = rightRotate(temp);
            }
        } else if (diff < -1) {
            if (data > (temp->rightChild->data)) {
                temp = leftRotate(temp);
            } else if (data < temp->rightChild->data) {
                temp->rightChild = rightRotate(temp->rightChild);
                temp = leftRotate(temp);
            }
        }
        return temp;
    }

public :

    BST() {
        rootNode = NULL;
        treeSize = 0;
        multiCount = false;
    }

    BST(bool multiCount) {
        rootNode = NULL;
        treeSize = 0;
        this->multiCount = multiCount;
    }

    T1 lower_bound(T data) {
        temporaryNode1 = rootNode;
        T1 index = 0;
        while (temporaryNode1 != NULL) {
            if (data < temporaryNode1->data) {
                temporaryNode1 = temporaryNode1->leftChild;
            } else if (data > temporaryNode1->data) {
                index += (temporaryNode1->totalCount + temporaryNode1->leftCount);
                temporaryNode1 = temporaryNode1->rightChild;
            } else {
                index += (temporaryNode1->leftCount);
                break;
            }
        }
        return index;
    }

    T get(T1 index) {
        temporaryNode1 = rootNode;
        T1 current = 0;
        while (temporaryNode1 != NULL) {
            if (temporaryNode1->leftChild == NULL) {
                if (temporaryNode1->totalCount + current > index) return temporaryNode1->data;
                else {
                    current += temporaryNode1->totalCount;
                    temporaryNode1 = temporaryNode1->rightChild;
                }
            } else {
                if (current + temporaryNode1->leftCount > index) temporaryNode1 = temporaryNode1->leftChild;
                else if (current + temporaryNode1->leftCount + temporaryNode1->totalCount > index)
                    return temporaryNode1->data;
                else {
                    current += temporaryNode1->totalCount + temporaryNode1->leftCount;
                    temporaryNode1 = temporaryNode1->rightChild;
                }
            }
        }
        assert("Not possible");
    }

    void insert(T data, T1 totalCount = 1) {
        if (totalCount > 0) rootNode = insert(rootNode, data, totalCount);
    }

    void remove(T data, T1 totalCount = 1) {
        if (totalCount > 0) rootNode = remove(rootNode, data, totalCount);
    }

    T1 getCount(T data) {
        temporaryNode1 = rootNode;
        while (temporaryNode1 != NULL) {
            if (data < temporaryNode1->data) temporaryNode1 = temporaryNode1->leftChild;
            else if (data > temporaryNode1->data) temporaryNode1 = temporaryNode1->rightChild;
            else return temporaryNode1->totalCount;
        }
        return 0;
    }

    bool contains(T data) {
        temporaryNode1 = rootNode;
        while (temporaryNode1 != NULL) {
            if (data == temporaryNode1->data) return true;
            else if (data < temporaryNode1->data) temporaryNode1 = temporaryNode1->leftChild;
            else temporaryNode1 = temporaryNode1->rightChild;
        }
        return false;
    }

    T1 size() {
        return this->treeSize;
    }
};

#endif //CM_BST_HPP

using namespace std;

class CWorldOfDarkraftBattleForAzathoth {
public:
    vector<long long> BIT;

    void update(int x, long long delta) {
        for (; x <= 1000000; x += x & -x)
            BIT[x] += delta;
    }

    long long query(int x) {

        long long sum = 0;
        for (; x > 0; x -= x & -x)
            sum += BIT[x];
        return sum;
    }

    void solve(std::istream &in, std::ostream &out) {
        int n, m, p;
        in >> n >> m >> p;
        BIT.resize(1000005, 0);
        vector<pair<int, int>> attack(n, {-1, -1});
        vector<pair<int, int>> defense(m, {-1, -1});
        for (int i = 0; i < n; i++) in >> attack[i].first >> attack[i].second;
        for (int i = 0; i < m; i++) in >> defense[i].first >> defense[i].second;
        vector<pair<int, pair<int, int>>> monster(p, {-1, {-1, -1}});
        for (int i = 0; i < p; i++) in >> monster[i].first >> monster[i].second.first >> monster[i].second.second;
        sort(attack.begin(), attack.end());
        sort(monster.begin(), monster.end());
        vector<long long> minD(1000005, LLONG_MAX / 10);
        BST<int, int> bst(false);
        for (int i = 0; i < m; i++) minD[defense[i].first] = min(minD[defense[i].first], (long long) defense[i].second);
        for (int i = 0; i < m; i++) bst.insert(defense[i].first);
        for (int i = 1000003; i >= 0; i--) {
            minD[i] = min(minD[i + 1], minD[i]);
        }
        int pointerC = 0;
        long long ans = LLONG_MIN;
        long long sumMax = 0;
        int minB = 1000001;
        int maxB = 0;
        for (int i = 0; i < n; i++) {
            while (pointerC < p && monster[pointerC].first < attack[i].first) {
                update(monster[pointerC].second.first, monster[pointerC].second.second);
                minB = min(minB, monster[pointerC].second.first);
                maxB = max(maxB, monster[pointerC].second.first);
                {
                    int temp = -1;
                    int index = bst.lower_bound(minB + 1);
                    if (index != bst.size()) temp = bst.get(index);
                    if (temp != -1)ans = max(ans, 0ll - attack[i].second - minD[temp] + query(temp - 1));
                }

                {
                    int temp = -1;
                    int index = bst.lower_bound(minB);
                    if (index != bst.size()) temp = bst.get(index);
                    if (temp != -1)ans = max(ans, 0ll - attack[i].second - minD[temp] + query(temp - 1));
                }

                {
                    int temp = -1;
                    int index = bst.lower_bound(minB - 1);
                    if (index != bst.size()) temp = bst.get(index);
                    if (temp != -1)ans = max(ans, 0ll - attack[i].second - minD[temp] + query(temp - 1));
                }

                {
                    int temp = -1;
                    int index = bst.lower_bound(maxB + 1);
                    if (index != bst.size()) temp = bst.get(index);
                    if (temp != -1)ans = max(ans, 0ll - attack[i].second - minD[temp] + query(temp - 1));
                }

                {
                    int temp = -1;
                    int index = bst.lower_bound(maxB);
                    if (index != bst.size()) temp = bst.get(index);
                    if (temp != -1) ans = max(ans, 0ll - attack[i].second - minD[temp] + query(temp - 1));
                }

                {
                    int temp = -1;
                    int index = bst.lower_bound(maxB - 1);
                    if (index != bst.size()) temp = bst.get(index);
                    if (temp != -1) ans = max(ans, 0ll - attack[i].second - minD[temp] + query(temp - 1));
                }
                pointerC++;
            }

            ans = max(ans, 0ll - attack[i].second - minD[0]);
        }
        out << ans << "\n";
    }
};

int main() {
    CWorldOfDarkraftBattleForAzathoth solver;
    std::ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    std::istream &in(std::cin);
    std::ostream &out(std::cout);
    solver.solve(in, out);
    return 0;
}