#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
template <class T1, class T2>
istream& operator>>(istream& in, pair<T1, T2>& p) {
  in >> p.first >> p.second;
  return in;
}
template <class T1, class T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& p) {
  out << p.first << ' ' << p.second << '\n';
  return out;
}
template <class T>
istream& operator>>(istream& in, vector<T>& arr) {
  for (T& i : arr) in >> i;
  return in;
}
template <class T>
ostream& operator<<(ostream& out, const vector<T>& arr) {
  for (const T& i : arr) out << i << ' ';
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const vector<vector<T>>& arr) {
  for (const vector<T>& i : arr) out << i << ' ' << '\n';
  return out;
}
vector<vector<int>> g, rg, tree;
vector<int> d, path;
int n, start, finish, k, minlen = 0, maxlen = 0;
void go_tree(int v, int ind) {
  int cur = path[ind] - 1;
  if (find(g[v].begin(), g[v].end(), cur) == g[v].end()) {
    return;
  }
  bool ismax = false, ismin = false;
  for (int u : g[v]) {
    if (d[u] != INT_MAX) {
      if (d[u] <= d[cur] && !ismax && u != cur) {
        maxlen++;
        ismax = true;
      }
      if (d[u] < d[cur] && !ismin) {
        minlen++;
        ismin = true;
      }
      if (ismax && ismin) {
        break;
      }
    }
  }
  go_tree(cur, ind + 1);
}
void bfs() {
  queue<int> q;
  d.assign(n, INT_MAX);
  d[finish] = 0;
  q.push(finish);
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (int u : rg[v]) {
      if (d[u] > d[v] + 1) {
        d[u] = d[v] + 1;
        q.push(u);
      }
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int m;
  cin >> n >> m;
  g.resize(n);
  rg.resize(n);
  d.resize(n);
  tree.resize(n);
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    g[u - 1].push_back(v - 1);
    rg[v - 1].push_back(u - 1);
  }
  cin >> k;
  path.resize(k);
  cin >> path;
  start = path[0] - 1;
  finish = path.back() - 1;
  bfs();
  go_tree(start, 1);
  cout << minlen << ' ' << maxlen << '\n';
  return 0;
}
