#include <bits/stdc++.h>
using namespace std;
inline long long getnum() {
  char c = getchar();
  long long num, sign = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') sign = -1;
  for (num = 0; c >= '0' && c <= '9';) {
    c -= '0';
    num = num * 10 + c;
    c = getchar();
  }
  return num * sign;
}
int A[1000004];
int B[1000004];
vector<pair<int, int> > V[1000004];
int Tree[4000004];
int Best[4000004];
void update(int l, int r, int ind, int p, int v) {
  if (l == r) {
    Tree[ind] += v;
    Best[ind] = Tree[ind];
    return;
  }
  int m = (l + r) / 2;
  if (p <= m)
    update(l, m, 2 * ind, p, v);
  else
    update(m + 1, r, 2 * ind + 1, p, v);
  Tree[ind] = Tree[2 * ind] + Tree[2 * ind + 1];
  Best[ind] = Best[ind * 2];
  Best[ind] = max(Best[ind], Tree[2 * ind] + Best[ind * 2 + 1]);
}
int main() {
  int n = getnum(), m = getnum(), p = getnum();
  for (int i = 1; i <= n; i++) {
    int x = getnum(), c = getnum();
    if (A[x] == 0) A[x] = c;
    A[x] = min(A[x], c);
  }
  for (int i = 1000000; i >= 1; i--) {
    if (A[i] == 0) A[i] = A[i + 1];
    if (A[i + 1] > 0) A[i] = min(A[i], A[i + 1]);
  }
  for (int i = 1; i <= m; i++) {
    int x = getnum(), c = getnum();
    if (B[x] == 0) B[x] = c;
    B[x] = min(B[x], c);
  }
  for (int i = 1000000; i >= 1; i--) {
    if (B[i] == 0) B[i] = B[i + 1];
    if (B[i + 1] > 0) B[i] = min(B[i], B[i + 1]);
  }
  int lst = 1000000;
  for (int i = 1; i <= 1000000; i++) {
    if (B[i] == 0) {
      lst = i - 1;
      break;
    }
    update(1, 1000000, 1, i, B[i - 1] - B[i]);
  }
  for (int i = 1; i <= p; i++) {
    int a = getnum(), b = getnum(), c = getnum();
    if (a == 1000000 || b >= lst) continue;
    V[a].push_back({b, c});
  }
  int ans = INT_MIN;
  for (int i = 1; i <= 1000000; i++) {
    if (A[i] == 0) break;
    ans = max(ans, Best[1] - A[i]);
    for (pair<int, int> x : V[i]) {
      update(1, 1000000, 1, x.first + 1, x.second);
    }
  }
  cout << ans;
}
