#include <bits/stdc++.h>
using namespace std;
void sc() {}
template <class T, class... A>
void sc(T& t, A&... a) {
  cin >> t, sc(a...);
}
void pr() {}
template <class T, class... A>
void pr(T t, A... a) {
  cout << t, pr(a...);
}
const int N = 2e5 + 5;
vector<int> adj[N], radj[N], dist(N, INT_MAX);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m;
  sc(n, m);
  for (int i = 0; i < m; i++) {
    int u, v;
    sc(u, v);
    adj[u].push_back(v);
    radj[v].push_back(u);
  }
  int k;
  sc(k);
  vector<int> a(k);
  for (int i = 0; i < k; i++) sc(a[i]);
  dist[a.back()] = 0;
  queue<int> q;
  q.push(a.back());
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int v : radj[u]) {
      if (dist[u] + 1 < dist[v]) {
        dist[v] = dist[u] + 1;
        q.push(v);
      }
    }
  }
  int mn = 0, mx = 0;
  for (int i = 0; i < k - 1; i++) {
    int wnt = dist[a[i]] - 1;
    if (dist[a[i + 1]] != wnt)
      mn++, mx++;
    else {
      for (int j : adj[a[i]]) {
        if (j != a[i + 1] && dist[j] == wnt) {
          mx++;
          break;
        }
      }
    }
  }
  pr(mn, ' ', mx, '\n');
}
