#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n, m, k, path[N], dist[N];
vector<int> v[N], r[N];
void getdist(int src) {
  for (int i = 1; i <= n; i++) dist[i] = 1e9;
  queue<pair<int, int> > q;
  q.push(make_pair(0, src));
  while (!q.empty()) {
    pair<int, int> p = q.front();
    q.pop();
    if (dist[p.second] > p.first) {
      dist[p.second] = p.first;
      for (auto i : r[p.second]) {
        q.push(make_pair(p.first + 1, i));
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int a, b;
    cin >> a >> b;
    v[a].push_back(b);
    r[b].push_back(a);
  }
  cin >> k;
  for (int i = 1; i <= k; i++) cin >> path[i];
  getdist(path[k]);
  int minans = 0, maxans = 0;
  for (int i = 2; i < k; i++) {
    int prev = path[i - 1];
    int d = dist[prev];
    int count = 0;
    for (auto j : v[prev]) {
      if (dist[j] + 1 == dist[prev]) count++;
    }
    if (dist[path[i]] != (dist[prev] - 1)) {
      minans++;
      maxans++;
    } else {
      if (count > 1) {
        maxans++;
      }
    }
  }
  cout << minans << " " << maxans;
}
