#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long fast(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) {
      b--;
      ans = ans * a % mod;
    } else {
      a = a * a % mod;
      b /= 2;
    }
  }
  return ans % mod;
}
const int N = 2e5 + 5;
vector<int> forw[N];
vector<int> backw[N];
vector<int> dist(N, -1);
vector<int> p(N);
int n, m;
int k;
void solve();
void bfs(int src);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    forw[x].push_back(y);
    backw[y].push_back(x);
  }
  cin >> k;
  for (int i = 0; i < k; i++) cin >> p[i];
  bfs(p[k - 1]);
  solve();
}
void bfs(int src) {
  queue<int> q;
  q.push(src);
  dist[src] = 0;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (auto child : backw[x])
      if (dist[child] == -1) {
        q.push(child);
        dist[child] = dist[x] + 1;
      }
  }
}
void solve() {
  int mini = 0, maxi = 0;
  for (int i = 0; i < k - 1; i++) {
    set<int> sameDist;
    int minDist = INT_MAX;
    for (auto child : forw[p[i]]) {
      if (dist[child] == -1 || dist[child] > minDist) continue;
      if (dist[child] < minDist) {
        sameDist.clear();
        sameDist.insert(child);
        minDist = dist[child];
      } else if (dist[child] == minDist)
        sameDist.insert(child);
    }
    if (sameDist.find(p[i + 1]) == sameDist.end()) {
      mini += 1;
      maxi += 1;
    } else if (sameDist.size() > 1)
      maxi += 1;
  }
  cout << mini << " " << maxi << endl;
}
