#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e9 + 7, second = 1e5 + 1;
vector<long long int> v[200005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    long long int n, m, x, y, k, s, d;
    cin >> n >> m;
    vector<long long int> gv[n + 1];
    for (long long int i = 0; i < m; i++) {
      cin >> x >> y;
      v[x].push_back(y);
      gv[y].push_back(x);
    }
    vector<long long int> p;
    cin >> k;
    for (long long int i = 0; i < k; i++) {
      cin >> x;
      p.push_back(x);
    }
    s = p[0];
    d = p[k - 1];
    vector<long long int> dst(n + 1, N);
    dst[d] = 0;
    queue<long long int> q;
    q.push(d);
    while (!q.empty()) {
      x = q.front();
      q.pop();
      for (long long int y : gv[x]) {
        if (dst[x] + 1 < dst[y]) {
          dst[y] = dst[x] + 1;
          q.push(y);
        }
      }
    }
    x = 0;
    y = 0;
    for (long long int i = 0; i < k - 1; i++) {
      if (dst[p[i]] - dst[p[i + 1]] != 1) {
        x++;
      } else {
        for (long long int z : v[p[i]]) {
          if (z != p[i + 1] && dst[p[i]] - dst[z] == 1) {
            y++;
            break;
          }
        }
      }
    }
    cout << x << " " << x + y << endl;
  }
  return 0;
}
