#include <bits/stdc++.h>
const double eps = 1e-10;
const int maxn = 1e6 + 1;
const long long mod = 1e9 + 7;
const long long INF = 1e18;
int sgn(double a) { return a < -eps ? -1 : a < eps ? 0 : 1; }
using namespace std;
struct segment_tree {
  long long val;
  int lazy;
} tree[maxn << 2];
long long a[maxn], b[maxn];
vector<pair<int, int> > vec[maxn];
void build(int l, int r, int nod) {
  if (l == r) {
    tree[nod].val = -b[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, nod << 1);
  build(mid + 1, r, (nod << 1) + 1);
  tree[nod].val = max(tree[nod << 1].val, tree[(nod << 1) + 1].val);
}
void pushdown(int nod) {
  tree[nod << 1].lazy += tree[nod].lazy;
  tree[(nod << 1) + 1].lazy += tree[nod].lazy;
  tree[nod << 1].val += tree[nod].lazy;
  tree[(nod << 1) + 1].val += tree[nod].lazy;
  tree[nod].lazy = 0;
}
void modify(int l, int r, int ql, int qr, int k, int nod) {
  if (ql <= l && qr >= r) {
    tree[nod].lazy += k;
    tree[nod].val += k;
    return;
  }
  if (tree[nod].lazy) pushdown(nod);
  int mid = (l + r) >> 1;
  if (ql <= mid) modify(l, mid, ql, qr, k, nod << 1);
  if (qr > mid) modify(mid + 1, r, ql, qr, k, (nod << 1) + 1);
  tree[nod].val = max(tree[nod << 1].val, tree[(nod << 1) + 1].val);
}
long long query(int l, int r, int ql, int qr, int nod) {
  if (ql <= l && qr >= r) return tree[nod].val;
  if (tree[nod].lazy) pushdown(nod);
  int mid = (l + r) >> 1;
  long long ans = 0;
  if (ql <= mid) ans += query(l, mid, ql, qr, nod << 1);
  if (qr > mid) ans += query(mid + 1, r, ql, qr, (nod << 1) + 1);
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  for (int i = 0; i <= maxn; i++) a[i] = b[i] = INF;
  int n, m, p;
  cin >> n >> m >> p;
  for (int i = 1; i <= n; i++) {
    int x;
    long long y;
    cin >> x >> y;
    a[x] = min(a[x], y);
  }
  for (int i = 1; i <= m; i++) {
    int x;
    long long y;
    cin >> x >> y;
    b[x] = min(b[x], y);
  }
  for (int i = 1; i <= p; i++) {
    int x, y, z;
    cin >> x >> y >> z;
    vec[x].push_back(make_pair(y, z));
  }
  build(1, maxn, 1);
  long long ans = -INF;
  for (int i = 1; i <= maxn; i++) {
    ans = max(ans, tree[1].val - a[i]);
    for (pair<int, int> o : vec[i]) {
      if (o.first + 1 < maxn) modify(1, maxn, o.first + 1, maxn, o.second, 1);
    }
  }
  cout << ans << endl;
  return 0;
}
